From: Evan You Date: Tue, 17 Nov 2020 23:31:49 +0000 (-0500) Subject: chore: remove non-working esm-browser build for compiler-sfc for now X-Git-Tag: v3.0.3~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9297410569afd5154d8dd8ba4b36ff6f19b354d7;p=thirdparty%2Fvuejs%2Fcore.git chore: remove non-working esm-browser build for compiler-sfc for now --- diff --git a/packages/compiler-sfc/README.md b/packages/compiler-sfc/README.md index 4fc4ffa107..cc7b6cc05d 100644 --- a/packages/compiler-sfc/README.md +++ b/packages/compiler-sfc/README.md @@ -2,14 +2,18 @@ > 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](https://github.com/vuejs/vue-loader). +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](https://github.com/vuejs/vue-loader), [rollup-plugin-vue](https://github.com/vuejs/rollup-plugin-vue) and [vite](https://github.com/vitejs/vite). -The API surface is intentionally minimal - the goal is to reuse as much as possible while being as flexible as possible. +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 Usage +## Browser Build Notes -This package relies on `postcss`, `postcss-selector-parser` and `postcss-modules` +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). -## API +## Usage Example -TODO +```js +// TODO +``` + +For detailed APIs, check out the source type definitions. diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index f041dde1e1..47fff1dcfd 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -11,8 +11,7 @@ "name": "VueCompilerSFC", "formats": [ "cjs", - "global", - "esm-browser" + "global" ], "prod": false, "enableNonBrowserBranches": true