vue3-yuanma/packages/compiler-sfc
2020-11-17 18:54:47 -05:00
..
__tests__ wip: test case for v-model + inline mode codegen 2020-11-17 15:59:09 -05:00
src wip: new cssVars SSR integration + fix cssVars SSR injection for suspense 2020-11-17 18:54:47 -05:00
api-extractor.json refactor(types): mark internal API exports and exclude from d.ts 2020-04-30 17:04:35 -04:00
package.json chore: remove non-working esm-browser build for compiler-sfc for now 2020-11-17 18:31:49 -05:00
README.md chore: remove non-working esm-browser build for compiler-sfc for now 2020-11-17 18:31:49 -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, rollup-plugin-vue and vite.

The API is intentionally low-level, because different toolings have different constraints on how much context is shared between the transformation of each block in an SFC. For example, the template sub-loader in vue-loader may not have access to the full SFC and its descriptor.

Browser Build Notes

The browser build relies on a browser-bundled build of postcss to be available under the global postcss (since it can't be properly bundled by Rollup).

Usage Example

// TODO

For detailed APIs, check out the source type definitions.