]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: remove non-working esm-browser build for compiler-sfc for now
authorEvan You <yyx990803@gmail.com>
Tue, 17 Nov 2020 23:31:49 +0000 (18:31 -0500)
committerEvan You <yyx990803@gmail.com>
Tue, 17 Nov 2020 23:31:49 +0000 (18:31 -0500)
packages/compiler-sfc/README.md
packages/compiler-sfc/package.json

index 4fc4ffa107ff6218d10d7d302467425ecdff72d5..cc7b6cc05dc73f48f31f1a2e17451699f34458d1 100644 (file)
@@ -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.
index f041dde1e1cd8e94a381be2290b4a832f3fe4780..47fff1dcfd47f495b1be69fe36aab0c21e0c35bd 100644 (file)
@@ -11,8 +11,7 @@
     "name": "VueCompilerSFC",
     "formats": [
       "cjs",
-      "global",
-      "esm-browser"
+      "global"
     ],
     "prod": false,
     "enableNonBrowserBranches": true