You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Defined in [index.ts:796](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/f07a644/src/index.ts#L796)*
59
+
*Defined in [index.ts:819](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/f3c303d/src/index.ts#L819)*
55
60
56
61
This is the main function.
62
+
This function is intended to be used only to load the entry point of your application.
63
+
If for some reason you need to use it in your components, be sure to share at least the options.`compiledCache` object between all calls.
57
64
58
65
#### Parameters:
59
66
60
67
Name | Type | Default value | Description |
61
68
------ | ------ | ------ | ------ |
62
69
`path` | string | - | The path of the `.vue` file. If path is not a path (eg. an string ID), your [getFile](interfaces/options.md#getfile) function must return a [File](README.md#file) object. |
63
-
`options` | [Options](interfaces/options.md) | throwNotDefined('options') | The options |
*Defined in [index.ts:200](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/f07a644/src/index.ts#L200)*
50
+
*Defined in [index.ts:209](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/f3c303d/src/index.ts#L209)*
50
51
51
52
Additional module type handlers. see [ModuleHandler](modulehandler.md)
52
53
@@ -56,7 +57,7 @@ ___
56
57
57
58
• `Optional`**compiledCache**: [Cache](cache.md)
58
59
59
-
*Defined in [index.ts:240](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/f07a644/src/index.ts#L240)*
60
+
*Defined in [index.ts:249](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/f3c303d/src/index.ts#L249)*
60
61
61
62
[get](cache.md#get)() and [set](cache.md#set)() functions of this object are called when the lib needs to save or load already compiled code. get and set functions must return a `Promise` (or can be `async`).
62
63
Since compilation consume a lot of CPU, is is always a good idea to provide this object.
*Defined in [index.ts:99](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/f07a644/src/index.ts#L99)*
148
+
*Defined in [index.ts:108](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/f3c303d/src/index.ts#L108)*
148
149
149
150
Initial cache that will contain resolved dependencies. All new modules go here.
150
151
`vue` must initially be contained in this object.
151
-
[moduleCache](options.md#modulecache) is mandatory for the lib but optional for you. If you do not provide it, the lib will automatically add it to the [[options]] object.
152
+
[moduleCache](options.md#modulecache) is mandatory for the lib. If you do not provide it, the library will create one.
152
153
It is recommended to provide a prototype-less object (`Object.create(null)`) to avoid potential conflict with `Object` properties (constructor, __proto__, hasOwnProperty, ...).
153
154
*
154
155
See also [[options.loadModule]].
@@ -162,13 +163,23 @@ See also [[options.loadModule]].
*Defined in [index.ts:258](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/f07a644/src/index.ts#L258)*
280
+
*Defined in [index.ts:267](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/f3c303d/src/index.ts#L267)*
270
281
271
282
Called by the library when there is somthing to log (eg. scripts compilation errors, template compilation errors, template compilation tips, style compilation errors, ...)
0 commit comments