Skip to content

Commit 3088392

Browse files
wip(docs): more FAQ
1 parent c8bf01e commit 3088392

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

docs/faq.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,24 @@ See the [migration guide](./migrationGuide.md)
1010
Yes, vue3-sfc-loader and vue2-sfc-loader embeds babel that will transform your ES6 into ES5.
1111

1212

13-
## Is vue2-sfc-loader working on IE 11/
13+
## Is vue2-sfc-loader working on IE 11
1414

1515
Yes, since 0.8.4+ `vue2-sfc-loader.js` supports IE 11.
1616

1717

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+
1831
## Can I call `loadModule()` several times ?
1932

2033
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
5568

5669
## How to use 3rd party plugins or components
5770

71+
5872
#### From a `<script>` tag
5973
If the plugin is loaded through a `<script>` tag, you have to store the plugin's module in `options.moduleCache`.
6074
Note that this is what is currently done with vue :
@@ -69,6 +83,7 @@ const options = {
6983
```
7084
then, subsequent `import Vue from 'vue'` will return the Vue module (`options.moduleCache.vue`).
7185

86+
7287
#### From the same origin
7388
If your plugin is reachable from the current URL (same origin, relative or absolute) just use `import ... from`, `import()` or `require()`.
7489
`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

Comments
 (0)