Skip to content

Commit 7cf123a

Browse files
wip(docs): enhance FAQ
1 parent 9d586c4 commit 7cf123a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

docs/faq.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# FAQ
22

3+
## Can I load ES6 modules/components ?
4+
5+
Yes, vue3-sfc-loader and vue2-sfc-loader embeds babel that will transform your ES6 into ES5.
6+
7+
8+
## Is vue2-sfc-loader working on IE 11/
9+
10+
Yes, since 0.8.4+ `vue2-sfc-loader.js` supports IE 11.
11+
12+
13+
## Can I call `loadModule()` several times ?
14+
15+
Usually, you call `loadModule()` only once, to load your application entry point (eg. `app.vue`).
16+
17+
But sometimes (rarely) it is necessary to call `loadModule()` several times.
18+
In this case, the application must, at least, share the same `options.moduleCache` through all its `loadModule()` calls.
19+
eg.
20+
```
21+
const options = {
22+
moduleCache: {
23+
...
24+
},
25+
...
26+
}
27+
28+
loadModule('./main.vue', options);
29+
loadModule('./another.vue', options);
30+
```
31+
32+
or, ultimately:
33+
```
34+
const moduleCache = {
35+
...
36+
},
37+
38+
loadModule('./main.vue', { moduleCache, ... });
39+
loadModule('./another.vue', { moduleCache, ... });
40+
```
41+
42+
343
## Can I use vue3-sfc-loader source code directly (./src/index.ts)
444

545
Loading from sources "vue3-sfc-loader/src/index" will not work. Sources are intended to be processed by webpack before being usable.

0 commit comments

Comments
 (0)