Skip to content

Commit 7aece11

Browse files
wip(docs): minor enhancements
1 parent 0ce48f9 commit 7aece11

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vue3-sfc-loader
22

3-
###### [API](docs/api/README.md#loadmodule) | see [FAQ](docs/faq.md) | [Examples](docs/examples.md) | [dist](#dist) | [Roadmap](../../issues/1)
3+
###### [API](docs/api/README.md#loadmodule) | [FAQ](docs/faq.md) | [Examples](docs/examples.md) | [dist](#dist) | [Roadmap](../../issues/1)
44

55
Vue3/Vue2 Single File Component loader.
66
Load .vue files dynamically at runtime from your html/js. No node.js environment, no (webpack) build step needed.

docs/faq.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## How to use 3rd party plugins or components
44

5-
#### from a `<script>` tag
5+
#### From a `<script>` tag
66
If the plugin is loaded through a `<script>` tag, you have to store the plugin's module in `options.moduleCache`.
77
Note that this is what is currently done with vue :
88
```
@@ -16,10 +16,11 @@ const options = {
1616
```
1717
then, subsequent `import Vue from 'vue'` will return the Vue module (`options.moduleCache.vue`).
1818

19-
#### same origin
19+
#### From the same origin
2020
If your plugin is reachable from the current URL (same origin, relative or absolute) just use `import from`, `import()` or `require()`.
2121
`vue3-sfc-loader` is able to load esm and cjs modules). Just take care to specify the plugin entry point.
2222

23+
2324
eg.
2425
```
2526
import Vue from 'vue'
@@ -28,7 +29,7 @@ vue.use(myPlugin);
2829
...
2930
```
3031

31-
#### from a different origin (remote component)
32+
#### From a different origin (remote component)
3233
If your plugin is hosted elsewhere (on a different origin), you have to define your own `option.pathResolve`.
3334
See https://github.com/FranckFreiburger/vue3-sfc-loader/blob/main/docs/examples.md#use-remote-components
3435

0 commit comments

Comments
 (0)