39
39
* [ loadModule] ( README.md#loadmodule )
40
40
* [ loadModuleInternal] ( README.md#loadmoduleinternal )
41
41
42
+ ### Object literals
43
+
44
+ * [ targetBrowserBabelPlugins] ( README.md#targetbrowserbabelplugins )
45
+
42
46
## Type aliases
43
47
44
48
### AbstractPath
45
49
46
50
Ƭ ** AbstractPath** : { toString: () => string }
47
51
48
- * Defined in [ types.ts:32] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L32 ) *
52
+ * Defined in [ types.ts:32] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L32 ) *
49
53
50
54
An abstract way to specify a path. It could be a simple string or a object like an URL. An AbstractPath must always be convertible to a string.
51
55
61
65
62
66
Ƭ ** Cache** : { get: (key: string) => Promise<string\> ; set: (key: string, value: string) => Promise<void\> }
63
67
64
- * Defined in [ types.ts:20] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L20 ) *
68
+ * Defined in [ types.ts:20] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L20 ) *
65
69
66
70
#### Type declaration:
67
71
76
80
77
81
Ƭ ** ContentData** : string \| ArrayBuffer
78
82
79
- * Defined in [ types.ts:71] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L71 ) *
83
+ * Defined in [ types.ts:71] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L71 ) *
80
84
81
85
___
82
86
83
87
### CustomBlock
84
88
85
89
Ƭ ** CustomBlock** : { attrs: Record<string, string \| true\> ; content: string ; type: string }
86
90
87
- * Defined in [ types.ts:109] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L109 ) *
91
+ * Defined in [ types.ts:109] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L109 ) *
88
92
89
93
A custom block
90
94
102
106
103
107
Ƭ ** CustomBlockCallback** : (component: [ ModuleExport] ( README.md#moduleexport ) ) => void
104
108
105
- * Defined in [ types.ts:103] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L103 ) *
109
+ * Defined in [ types.ts:103] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L103 ) *
106
110
107
111
CustomBlockCallback function type
108
112
112
116
113
117
Ƭ ** File** : { getContentData: (asBinary: Boolean) => Promise<[ ContentData] ( README.md#contentdata ) \> ; type: string }
114
118
115
- * Defined in [ types.ts:77] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L77 ) *
119
+ * Defined in [ types.ts:77] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L77 ) *
116
120
117
121
Represents a file content and the extension name.
118
122
@@ -129,15 +133,15 @@ ___
129
133
130
134
Ƭ ** LangProcessor** : (source: string, preprocessOptions?: any) => Promise<string\> \| string
131
135
132
- * Defined in [ types.ts:399] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L399 ) *
136
+ * Defined in [ types.ts:399] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L399 ) *
133
137
134
138
___
135
139
136
140
### Module
137
141
138
142
Ƭ ** Module** : { exports: [ ModuleExport] ( README.md#moduleexport ) }
139
143
140
- * Defined in [ types.ts:129] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L129 ) *
144
+ * Defined in [ types.ts:129] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L129 ) *
141
145
142
146
This just represents a loaded js module
143
147
@@ -153,15 +157,15 @@ ___
153
157
154
158
Ƭ ** ModuleCacheId** : string
155
159
156
- * Defined in [ types.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L26 ) *
160
+ * Defined in [ types.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L26 ) *
157
161
158
162
___
159
163
160
164
### ModuleExport
161
165
162
166
Ƭ ** ModuleExport** : {}
163
167
164
- * Defined in [ types.ts:123] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L123 ) *
168
+ * Defined in [ types.ts:123] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L123 ) *
165
169
166
170
This just represents a loaded js module exports
167
171
171
175
172
176
Ƭ ** ModuleHandler** : (type: string, getContentData: File[ \" getContentData\" ] , path: [ AbstractPath] ( README.md#abstractpath ) , options: [ Options] ( README.md#options ) ) => Promise<[ ModuleExport] ( README.md#moduleexport ) \| null\>
173
177
174
- * Defined in [ types.ts:68] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L68 ) *
178
+ * Defined in [ types.ts:68] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L68 ) *
175
179
176
180
Used by the library when it needs to handle a does not know how to handle a given file type (eg. ` .json ` files).
177
181
196
200
197
201
Ƭ **Options**: { additionalBabelParserPlugins?: babel\_ParserPlugin[] ; additionalBabelPlugins?: Record<string, any\> ; compiledCache?: [Cache](README.md#cache) ; delimiters?: [string, string] ; handleModule?: [ModuleHandler](README.md#modulehandler) ; moduleCache: Record<[ModuleCacheId](README.md#modulecacheid), LoadingType<[ModuleExport](README.md#moduleexport)\> \| [ModuleExport](README.md#moduleexport)\> ; pathResolve: [PathResolve](README.md#pathresolve) ; addStyle: (style: string, scopeId: string \| undefined) => void ; customBlockHandler?: (block: [CustomBlock](README.md#customblock), filename: [AbstractPath](README.md#abstractpath), options: [Options](README.md#options)) => Promise<[CustomBlockCallback](README.md#customblockcallback) \| undefined\> ; getFile: (path: [AbstractPath](README.md#abstractpath)) => Promise<[File](README.md#file) \| [ContentData](README.md#contentdata)\> ; getResource: (pathCx: [PathContext](README.md#pathcontext), options: [Options](README.md#options)) => [Resource](README.md#resource) ; loadModule?: (path: [AbstractPath](README.md#abstractpath), options: [Options](README.md#options)) => Promise<[ModuleExport](README.md#moduleexport) \| undefined\> ; log?: (type: string, ...data: any[]) => void }
198
202
199
- * Defined in [ types.ts:140] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L140 ) *
203
+ * Defined in [ types.ts:140] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L140 ) *
200
204
201
205
#### Type declaration:
202
206
222
226
223
227
Ƭ ** PathContext** : { refPath: [ AbstractPath] ( README.md#abstractpath ) ; relPath: [ AbstractPath] ( README.md#abstractpath ) }
224
228
225
- * Defined in [ types.ts:41] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L41 ) *
229
+ * Defined in [ types.ts:41] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L41 ) *
226
230
227
231
A PathContext represents a path (relPath) relative to an abolute path (refPath)
228
232
Note that relPath is not necessary relative, but it is, relPath is relative to refPath.
240
244
241
245
Ƭ ** PathResolve** : (pathCx: [ PathContext] ( README.md#pathcontext ) ) => [ AbstractPath] ( README.md#abstractpath )
242
246
243
- * Defined in [ types.ts:50] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L50 ) *
247
+ * Defined in [ types.ts:50] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L50 ) *
244
248
245
249
relative to absolute module path resolution
246
250
250
254
251
255
Ƭ ** Resource** : { getContent: () => Promise<[ File] ( README.md#file ) \> ; id: [ ModuleCacheId] ( README.md#modulecacheid ) ; path: [ AbstractPath] ( README.md#abstractpath ) }
252
256
253
- * Defined in [ types.ts:88] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/types.ts#L88 ) *
257
+ * Defined in [ types.ts:88] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/types.ts#L88 ) *
254
258
255
259
Represents a resource.
256
260
@@ -268,9 +272,9 @@ Name | Type | Description |
268
272
269
273
• ` Const ` ** version** : string = process.env.VERSION
270
274
271
- * Defined in [ tools.ts:53 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/tools.ts#L53 ) *
275
+ * Defined in [ tools.ts:47 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/tools.ts#L47 ) *
272
276
273
- * Defined in [ index.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/index.ts#L26 ) *
277
+ * Defined in [ index.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/index.ts#L26 ) *
274
278
275
279
the version of the library (process.env.VERSION is set by webpack, at compile-time)
276
280
@@ -280,15 +284,15 @@ ___
280
284
281
285
• ` Const ` ** vueVersion** : string
282
286
283
- * Defined in [ createSFCModule.ts:4] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/createSFCModule.ts#L4 ) *
287
+ * Defined in [ createSFCModule.ts:4] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/createSFCModule.ts#L4 ) *
284
288
285
289
## Functions
286
290
287
291
### buildTemplateProcessor
288
292
289
293
▸ ** buildTemplateProcessor** (` processor ` : [ LangProcessor] ( README.md#langprocessor ) ): object
290
294
291
- * Defined in [ index.ts:179] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/index.ts#L179 ) *
295
+ * Defined in [ index.ts:179] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/index.ts#L179 ) *
292
296
293
297
Convert a function to template processor interface (consolidate)
294
298
310
314
311
315
▸ ** createSFCModule** (` source ` : string, ` filename ` : [ AbstractPath] ( README.md#abstractpath ) , ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
312
316
313
- * Defined in [ createSFCModule.ts:3] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/createSFCModule.ts#L3 ) *
317
+ * Defined in [ createSFCModule.ts:3] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/createSFCModule.ts#L3 ) *
314
318
315
319
#### Parameters:
316
320
328
332
329
333
▸ ** defaultGetResource** (` pathCx ` : [ PathContext] ( README.md#pathcontext ) , ` options ` : [ Options] ( README.md#options ) ): [ Resource] ( README.md#resource )
330
334
331
- * Defined in [ index.ts:76] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/index.ts#L76 ) *
335
+ * Defined in [ index.ts:76] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/index.ts#L76 ) *
332
336
333
337
Default getResource implementation
334
338
by default, getContent() use the file extension as file type.
348
352
349
353
▸ ** defaultHandleModule** (` type ` : string, ` getContentData ` : File[ \" getContentData\" ] , ` path ` : [ AbstractPath] ( README.md#abstractpath ) , ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \| null\>
350
354
351
- * Defined in [ tools.ts:372 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/tools.ts#L372 ) *
355
+ * Defined in [ tools.ts:370 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/tools.ts#L370 ) *
352
356
353
357
Default implementation of handleModule
354
358
369
373
370
374
▸ ` Const ` ** defaultPathResolve** (` __namedParameters ` : { refPath: [ AbstractPath] ( README.md#abstractpath ) ; relPath: [ AbstractPath] ( README.md#abstractpath ) }): string \| [ AbstractPath] ( README.md#abstractpath )
371
375
372
- * Defined in [ index.ts:53] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/index.ts#L53 ) *
376
+ * Defined in [ index.ts:53] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/index.ts#L53 ) *
373
377
374
378
Default resolve implementation
375
379
resolve() should handle 3 situations :
391
395
392
396
▸ ** loadModule** (` path ` : [ AbstractPath] ( README.md#abstractpath ) , ` options? ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
393
397
394
- * Defined in [ index.ts:152] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/index.ts#L152 ) *
398
+ * Defined in [ index.ts:152] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/index.ts#L152 ) *
395
399
396
400
This is the main function.
397
401
This function is intended to be used only to load the entry point of your application.
445
449
446
450
▸ ** loadModuleInternal** (` pathCx ` : [ PathContext] ( README.md#pathcontext ) , ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
447
451
448
- * Defined in [ tools.ts:260 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/839a54b /src/tools.ts#L260 ) *
452
+ * Defined in [ tools.ts:258 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825 /src/tools.ts#L258 ) *
449
453
450
454
#### Parameters:
451
455
@@ -455,3 +459,13 @@ Name | Type |
455
459
` options ` | [ Options] ( README.md#options ) |
456
460
457
461
** Returns:** Promise<[ ModuleExport] ( README.md#moduleexport ) \>
462
+
463
+ ## Object literals
464
+
465
+ ### targetBrowserBabelPlugins
466
+
467
+ ▪ ` Const ` ** targetBrowserBabelPlugins** : object
468
+
469
+ * Defined in [ tools.ts:205] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/4211825/src/tools.ts#L205 ) *
470
+
471
+ #### Properties:
0 commit comments