vue3-yuanma/packages/compiler-sfc
2019-11-06 21:58:15 -05:00
..
src feat: (wip) setup compiler-sfc 2019-11-06 21:58:15 -05:00
api-extractor.json feat: (wip) setup compiler-sfc 2019-11-06 21:58:15 -05:00
package.json feat: (wip) setup compiler-sfc 2019-11-06 21:58:15 -05:00
README.md feat: (wip) setup compiler-sfc 2019-11-06 21:58:15 -05:00

@vue/compiler-sfc

Lower level utilities for compiling Vue single file components

This package contains lower level utilities that you can use if you are writing a plugin / transform for a bundler or module system that compiles Vue single file components into JavaScript. It is used in vue-loader.

The API surface is intentionally minimal - the goal is to reuse as much as possible while being as flexible as possible.

Why isn't @vue/compiler-dom a peerDependency?

Since this package is more often used as a low-level utility, it is usually a transitive dependency in an actual Vue project. It is therefore the responsibility of the higher-level package (e.g. vue-loader) to inject @vue/compiler-dom via options when calling the compileTemplate methods.

Not listing it as a peer depedency also allows tooling authors to use a custom template compiler (built on top of @vue/compiler-core) instead of @vue/compiler-dom, without having to include it just to fullfil the peer dep requirement.

API

TODO