File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 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
55Vue3/Vue2 Single File Component loader.
66Load .vue files dynamically at runtime from your html/js. No node.js environment, no (webpack) build step needed.
Original file line number Diff line number Diff line change 22
33## How to use 3rd party plugins or components
44
5- #### from a ` <script> ` tag
5+ #### From a ` <script> ` tag
66If the plugin is loaded through a ` <script> ` tag, you have to store the plugin's module in ` options.moduleCache ` .
77Note that this is what is currently done with vue :
88```
@@ -16,10 +16,11 @@ const options = {
1616```
1717then, subsequent ` import Vue from 'vue' ` will return the Vue module (` options.moduleCache.vue ` ).
1818
19- #### same origin
19+ #### From the same origin
2020If 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+
2324eg.
2425```
2526import 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)
3233If your plugin is hosted elsewhere (on a different origin), you have to define your own ` option.pathResolve ` .
3334See https://github.com/FranckFreiburger/vue3-sfc-loader/blob/main/docs/examples.md#use-remote-components
3435
You can’t perform that action at this time.
0 commit comments