@@ -10,11 +10,24 @@ See the [migration guide](./migrationGuide.md)
10
10
Yes, vue3-sfc-loader and vue2-sfc-loader embeds babel that will transform your ES6 into ES5.
11
11
12
12
13
- ## Is vue2-sfc-loader working on IE 11/
13
+ ## Is vue2-sfc-loader working on IE 11
14
14
15
15
Yes, since 0.8.4+ ` vue2-sfc-loader.js ` supports IE 11.
16
16
17
17
18
+ ## Why vue3-sfc-loader is so big
19
+
20
+ Because it embeds :
21
+ - [ Vue3 compiler] ( https://github.com/vuejs/vue-next/tree/master/packages/compiler-sfc#readme )
22
+ - [ babel + many plugins] ( https://babeljs.io/ )
23
+ - [ postcss] ( https://postcss.org/ )
24
+ - [ core-js] ( https://github.com/zloirock/core-js )
25
+
26
+ [ see details
] ( https://unpkg.com/[email protected] /dist/vue3-sfc-loader.report.html ) (under the 'Stat' tab)
27
+
28
+ (note that by design, Vue3 compiler requires babel and postcss)
29
+
30
+
18
31
## Can I call ` loadModule() ` several times ?
19
32
20
33
Usually, you call ` loadModule() ` only once, to load your application entry point (eg. ` app.vue ` ).
@@ -55,6 +68,7 @@ Note that you can [build vue3-sfc-loader yourself](https://github.com/FranckFrei
55
68
56
69
## How to use 3rd party plugins or components
57
70
71
+
58
72
#### From a ` <script> ` tag
59
73
If the plugin is loaded through a ` <script> ` tag, you have to store the plugin's module in ` options.moduleCache ` .
60
74
Note that this is what is currently done with vue :
@@ -69,6 +83,7 @@ const options = {
69
83
```
70
84
then, subsequent ` import Vue from 'vue' ` will return the Vue module (` options.moduleCache.vue ` ).
71
85
86
+
72
87
#### From the same origin
73
88
If your plugin is reachable from the current URL (same origin, relative or absolute) just use ` import ... from ` , ` import() ` or ` require() ` .
74
89
` vue3-sfc-loader ` is able to load esm, cjs and umd modules). Just take care to specify the full entry point of the plugin.
0 commit comments