unplugin-vue-components 28.4.0 → 28.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{chunk-Z44OFZ6M.cjs → chunk-2L7VET54.cjs} +100 -58
- package/dist/{chunk-UZ5LIG7M.js → chunk-AXRVJ5GF.js} +2 -2
- package/dist/{chunk-CYD4VYHZ.cjs → chunk-DNROZFEW.cjs} +2 -2
- package/dist/{chunk-GDXMSVFX.js → chunk-NY5XDZK3.js} +47 -5
- package/dist/esbuild.cjs +3 -3
- package/dist/esbuild.js +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/dist/nuxt.cjs +4 -4
- package/dist/nuxt.js +2 -2
- package/dist/resolvers.cjs +24 -24
- package/dist/resolvers.js +1 -1
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.js +2 -2
- package/dist/rspack.cjs +3 -3
- package/dist/rspack.js +2 -2
- package/dist/types.d.cts +16 -1
- package/dist/types.d.ts +16 -1
- package/dist/vite.cjs +3 -3
- package/dist/vite.js +2 -2
- package/dist/webpack.cjs +3 -3
- package/dist/webpack.js +2 -2
- package/package.json +33 -31
package/README.md
CHANGED
|
@@ -341,7 +341,7 @@ export default {
|
|
|
341
341
|
|
|
342
342
|
// `customLoaderMatcher` is depreacted, use `include` instead
|
|
343
343
|
- customLoaderMatcher: id => id.endsWith('.md'),
|
|
344
|
-
+ include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
|
344
|
+
+ include: [/\.vue$/, /\.vue\?vue/, /\.vue\.[tj]sx?\?vue/, /\.md$/],
|
|
345
345
|
}),
|
|
346
346
|
],
|
|
347
347
|
}
|
|
@@ -401,7 +401,7 @@ Components({
|
|
|
401
401
|
|
|
402
402
|
// Filters for transforming targets (components to insert the auto import)
|
|
403
403
|
// Note these are NOT about including/excluding components registered - use `globs` or `excludeNames` for that
|
|
404
|
-
include: [/\.vue$/, /\.vue\?vue/],
|
|
404
|
+
include: [/\.vue$/, /\.vue\?vue/, /\.vue\.[tj]sx?\?vue/],
|
|
405
405
|
exclude: [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
|
|
406
406
|
|
|
407
407
|
// Filters for component names that will not be imported
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkDNROZFEWcjs = require('./chunk-DNROZFEW.cjs');
|
|
19
19
|
|
|
20
20
|
// src/core/unplugin.ts
|
|
21
21
|
var _fs = require('fs');
|
|
@@ -57,7 +57,7 @@ var TypeImportPresets = [
|
|
|
57
57
|
|
|
58
58
|
// src/core/type-imports/detect.ts
|
|
59
59
|
function detectTypeImports() {
|
|
60
|
-
return TypeImportPresets.map((i) => _localpkg.isPackageExists.call(void 0, i.from) ? i : void 0).filter(
|
|
60
|
+
return TypeImportPresets.map((i) => _localpkg.isPackageExists.call(void 0, i.from) ? i : void 0).filter(_chunkDNROZFEWcjs.notNullish);
|
|
61
61
|
}
|
|
62
62
|
function resolveTypeImports(imports) {
|
|
63
63
|
return imports.flatMap((i) => i.names.map((n) => ({ from: i.from, name: n, as: n })));
|
|
@@ -77,10 +77,10 @@ function parseDeclaration(code) {
|
|
|
77
77
|
component: {},
|
|
78
78
|
directive: {}
|
|
79
79
|
};
|
|
80
|
-
const componentDeclaration = _optionalChain([/export\s+interface\s+GlobalComponents\s*\{.*?\}/s, 'access',
|
|
80
|
+
const componentDeclaration = _optionalChain([/export\s+interface\s+GlobalComponents\s*\{.*?\}/s, 'access', _2 => _2.exec, 'call', _3 => _3(code), 'optionalAccess', _4 => _4[0]]);
|
|
81
81
|
if (componentDeclaration)
|
|
82
82
|
imports.component = extractImports(componentDeclaration);
|
|
83
|
-
const directiveDeclaration = _optionalChain([/export\s+interface\s+ComponentCustomProperties\s*\{.*?\}/s, 'access',
|
|
83
|
+
const directiveDeclaration = _optionalChain([/export\s+interface\s+ComponentCustomProperties\s*\{.*?\}/s, 'access', _5 => _5.exec, 'call', _6 => _6(code), 'optionalAccess', _7 => _7[0]]);
|
|
84
84
|
if (directiveDeclaration)
|
|
85
85
|
imports.directive = extractImports(directiveDeclaration);
|
|
86
86
|
return imports;
|
|
@@ -88,14 +88,14 @@ function parseDeclaration(code) {
|
|
|
88
88
|
function stringifyComponentInfo(filepath, { from: path, as: name, name: importName }, importPathTransform) {
|
|
89
89
|
if (!name)
|
|
90
90
|
return void 0;
|
|
91
|
-
path =
|
|
91
|
+
path = _chunkDNROZFEWcjs.getTransformedPath.call(void 0, path, importPathTransform);
|
|
92
92
|
const related = _path.isAbsolute.call(void 0, path) ? `./${_path.relative.call(void 0, _path.dirname.call(void 0, filepath), path)}` : path;
|
|
93
|
-
const entry = `typeof import('${
|
|
93
|
+
const entry = `typeof import('${_chunkDNROZFEWcjs.slash.call(void 0, related)}')['${importName || "default"}']`;
|
|
94
94
|
return [name, entry];
|
|
95
95
|
}
|
|
96
96
|
function stringifyComponentsInfo(filepath, components, importPathTransform) {
|
|
97
97
|
return Object.fromEntries(
|
|
98
|
-
components.map((info) => stringifyComponentInfo(filepath, info, importPathTransform)).filter(
|
|
98
|
+
components.map((info) => stringifyComponentInfo(filepath, info, importPathTransform)).filter(_chunkDNROZFEWcjs.notNullish)
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
function getDeclarationImports(ctx, filepath) {
|
|
@@ -127,8 +127,8 @@ function getDeclaration(ctx, filepath, originalImports) {
|
|
|
127
127
|
if (!imports)
|
|
128
128
|
return;
|
|
129
129
|
const declarations = {
|
|
130
|
-
component: stringifyDeclarationImports({ ..._optionalChain([originalImports, 'optionalAccess',
|
|
131
|
-
directive: stringifyDeclarationImports({ ..._optionalChain([originalImports, 'optionalAccess',
|
|
130
|
+
component: stringifyDeclarationImports({ ..._optionalChain([originalImports, 'optionalAccess', _8 => _8.component]), ...imports.component }),
|
|
131
|
+
directive: stringifyDeclarationImports({ ..._optionalChain([originalImports, 'optionalAccess', _9 => _9.directive]), ...imports.directive })
|
|
132
132
|
};
|
|
133
133
|
let code = `/* eslint-disable */
|
|
134
134
|
// @ts-nocheck
|
|
@@ -167,6 +167,22 @@ async function writeDeclaration(ctx, filepath, removeUnused = false) {
|
|
|
167
167
|
if (code !== originalContent)
|
|
168
168
|
await writeFile(filepath, code);
|
|
169
169
|
}
|
|
170
|
+
async function writeComponentsJson(ctx, _removeUnused = false) {
|
|
171
|
+
if (!ctx.dumpComponentsInfoPath)
|
|
172
|
+
return;
|
|
173
|
+
const components = [
|
|
174
|
+
...Object.entries({
|
|
175
|
+
...ctx.componentNameMap,
|
|
176
|
+
...ctx.componentCustomMap
|
|
177
|
+
}).map(([_, { name, as, from }]) => ({
|
|
178
|
+
name: name || "default",
|
|
179
|
+
as,
|
|
180
|
+
from
|
|
181
|
+
})),
|
|
182
|
+
...resolveTypeImports(ctx.options.types)
|
|
183
|
+
];
|
|
184
|
+
await writeFile(ctx.dumpComponentsInfoPath, JSON.stringify(components, null, 2));
|
|
185
|
+
}
|
|
170
186
|
|
|
171
187
|
// src/core/fs/glob.ts
|
|
172
188
|
|
|
@@ -182,7 +198,7 @@ function searchComponents(ctx) {
|
|
|
182
198
|
absolute: true,
|
|
183
199
|
expandDirectories: false
|
|
184
200
|
});
|
|
185
|
-
if (!files.length && !_optionalChain([ctx, 'access',
|
|
201
|
+
if (!files.length && !_optionalChain([ctx, 'access', _10 => _10.options, 'access', _11 => _11.resolvers, 'optionalAccess', _12 => _12.length]))
|
|
186
202
|
console.warn("[unplugin-vue-components] no components found");
|
|
187
203
|
debug(`${files.length} components found.`);
|
|
188
204
|
ctx.addComponents(files);
|
|
@@ -205,22 +221,22 @@ var defaultOptions = {
|
|
|
205
221
|
allowOverrides: false
|
|
206
222
|
};
|
|
207
223
|
function normalizeResolvers(resolvers) {
|
|
208
|
-
return
|
|
224
|
+
return _chunkDNROZFEWcjs.toArray.call(void 0, resolvers).flat().map((r) => typeof r === "function" ? { resolve: r, type: "component" } : r);
|
|
209
225
|
}
|
|
210
226
|
function resolveGlobsExclude(root, glob) {
|
|
211
227
|
const excludeReg = /^!/;
|
|
212
|
-
return
|
|
228
|
+
return _chunkDNROZFEWcjs.slash.call(void 0, `${excludeReg.test(glob) ? "!" : ""}${_path.resolve.call(void 0, root, glob.replace(excludeReg, ""))}`);
|
|
213
229
|
}
|
|
214
230
|
function resolveOptions(options, root) {
|
|
215
231
|
const resolved = Object.assign({}, defaultOptions, options);
|
|
216
232
|
resolved.resolvers = normalizeResolvers(resolved.resolvers);
|
|
217
|
-
resolved.extensions =
|
|
233
|
+
resolved.extensions = _chunkDNROZFEWcjs.toArray.call(void 0, resolved.extensions);
|
|
218
234
|
if (resolved.globs) {
|
|
219
|
-
resolved.globs =
|
|
235
|
+
resolved.globs = _chunkDNROZFEWcjs.toArray.call(void 0, resolved.globs).map((glob) => resolveGlobsExclude(root, glob));
|
|
220
236
|
resolved.resolvedDirs = [];
|
|
221
237
|
} else {
|
|
222
238
|
const extsGlob = resolved.extensions.length === 1 ? resolved.extensions : `{${resolved.extensions.join(",")}}`;
|
|
223
|
-
resolved.dirs =
|
|
239
|
+
resolved.dirs = _chunkDNROZFEWcjs.toArray.call(void 0, resolved.dirs);
|
|
224
240
|
const globs = resolved.dirs.map((i) => resolveGlobsExclude(root, i));
|
|
225
241
|
resolved.resolvedDirs = globs.filter((i) => !i.startsWith("!"));
|
|
226
242
|
resolved.globs = globs.map((i) => {
|
|
@@ -229,14 +245,12 @@ function resolveOptions(options, root) {
|
|
|
229
245
|
prefix = "!";
|
|
230
246
|
i = i.slice(1);
|
|
231
247
|
}
|
|
232
|
-
return resolved.deep ? prefix +
|
|
248
|
+
return resolved.deep ? prefix + _chunkDNROZFEWcjs.slash.call(void 0, _path.join.call(void 0, i, `**/*.${extsGlob}`)) : prefix + _chunkDNROZFEWcjs.slash.call(void 0, _path.join.call(void 0, i, `*.${extsGlob}`));
|
|
233
249
|
});
|
|
234
250
|
if (!resolved.extensions.length)
|
|
235
251
|
throw new Error("[unplugin-vue-components] `extensions` option is required to search for components");
|
|
236
252
|
}
|
|
237
|
-
|
|
238
|
-
resolved.globsExclude = [`**/node_modules/**`];
|
|
239
|
-
resolved.globsExclude = _chunkCYD4VYHZcjs.toArray.call(void 0, resolved.globsExclude || []).map((i) => resolveGlobsExclude(root, i));
|
|
253
|
+
resolved.globsExclude = _chunkDNROZFEWcjs.toArray.call(void 0, resolved.globsExclude || []).map((i) => resolveGlobsExclude(root, i));
|
|
240
254
|
resolved.globs = resolved.globs.filter((i) => {
|
|
241
255
|
if (!i.startsWith("!"))
|
|
242
256
|
return true;
|
|
@@ -259,7 +273,7 @@ function resolveOptions(options, root) {
|
|
|
259
273
|
return resolved;
|
|
260
274
|
}
|
|
261
275
|
function getVueVersion(root) {
|
|
262
|
-
const raw = _optionalChain([_localpkg.getPackageInfoSync.call(void 0, "vue", { paths: [_path.join.call(void 0, root, "/")] }), 'optionalAccess',
|
|
276
|
+
const raw = _optionalChain([_localpkg.getPackageInfoSync.call(void 0, "vue", { paths: [_path.join.call(void 0, root, "/")] }), 'optionalAccess', _13 => _13.version]) || "3";
|
|
263
277
|
const version = +raw.split(".").slice(0, 2).join(".");
|
|
264
278
|
if (version === 2.7)
|
|
265
279
|
return 2.7;
|
|
@@ -313,12 +327,12 @@ async function transformComponent(code, transformer2, s, ctx, sfcPath) {
|
|
|
313
327
|
const results = transformer2 === "vue2" ? resolveVue2(code, s) : resolveVue3(code, s, ctx.options.transformerUserResolveFunctions);
|
|
314
328
|
for (const { rawName, replace } of results) {
|
|
315
329
|
debug2(`| ${rawName}`);
|
|
316
|
-
const name =
|
|
330
|
+
const name = _chunkDNROZFEWcjs.pascalCase.call(void 0, rawName);
|
|
317
331
|
ctx.updateUsageMap(sfcPath, [name]);
|
|
318
332
|
const component = await ctx.findComponent(name, "component", [sfcPath]);
|
|
319
333
|
if (component) {
|
|
320
334
|
const varName = `__unplugin_components_${no}`;
|
|
321
|
-
s.prepend(`${
|
|
335
|
+
s.prepend(`${_chunkDNROZFEWcjs.stringifyComponentImport.call(void 0, { ...component, as: varName }, ctx)};
|
|
322
336
|
`);
|
|
323
337
|
no += 1;
|
|
324
338
|
replace(varName);
|
|
@@ -336,7 +350,7 @@ function getRenderFnStart(program) {
|
|
|
336
350
|
const renderFn = program.body.find(
|
|
337
351
|
(node) => node.type === "VariableDeclaration" && node.declarations[0].id.type === "Identifier" && ["render", "_sfc_render"].includes(node.declarations[0].id.name)
|
|
338
352
|
);
|
|
339
|
-
const start = _optionalChain([renderFn, 'optionalAccess',
|
|
353
|
+
const start = _optionalChain([renderFn, 'optionalAccess', _14 => _14.declarations, 'access', _15 => _15[0], 'access', _16 => _16.init, 'optionalAccess', _17 => _17.body, 'optionalAccess', _18 => _18.start]);
|
|
340
354
|
if (start === null || start === void 0)
|
|
341
355
|
throw new Error("[unplugin-vue-components:directive] Cannot find render function position.");
|
|
342
356
|
return start + 1;
|
|
@@ -367,20 +381,20 @@ async function resolveVue22(code, s) {
|
|
|
367
381
|
const results = [];
|
|
368
382
|
for (const node of nodes) {
|
|
369
383
|
const { callee, arguments: args } = node;
|
|
370
|
-
if (callee.type !== "Identifier" || callee.name !== "_c" || _optionalChain([args, 'access',
|
|
384
|
+
if (callee.type !== "Identifier" || callee.name !== "_c" || _optionalChain([args, 'access', _19 => _19[1], 'optionalAccess', _20 => _20.type]) !== "ObjectExpression")
|
|
371
385
|
continue;
|
|
372
|
-
const directives = _optionalChain([args, 'access',
|
|
386
|
+
const directives = _optionalChain([args, 'access', _21 => _21[1], 'access', _22 => _22.properties, 'access', _23 => _23.find, 'call', _24 => _24(
|
|
373
387
|
(property) => property.type === "ObjectProperty" && property.key.type === "Identifier" && property.key.name === "directives"
|
|
374
|
-
), 'optionalAccess',
|
|
388
|
+
), 'optionalAccess', _25 => _25.value]);
|
|
375
389
|
if (!directives || directives.type !== "ArrayExpression")
|
|
376
390
|
continue;
|
|
377
391
|
for (const directive of directives.elements) {
|
|
378
|
-
if (_optionalChain([directive, 'optionalAccess',
|
|
392
|
+
if (_optionalChain([directive, 'optionalAccess', _26 => _26.type]) !== "ObjectExpression")
|
|
379
393
|
continue;
|
|
380
|
-
const nameNode = _optionalChain([directive, 'access',
|
|
394
|
+
const nameNode = _optionalChain([directive, 'access', _27 => _27.properties, 'access', _28 => _28.find, 'call', _29 => _29(
|
|
381
395
|
(p) => p.type === "ObjectProperty" && p.key.type === "Identifier" && p.key.name === "name"
|
|
382
|
-
), 'optionalAccess',
|
|
383
|
-
if (_optionalChain([nameNode, 'optionalAccess',
|
|
396
|
+
), 'optionalAccess', _30 => _30.value]);
|
|
397
|
+
if (_optionalChain([nameNode, 'optionalAccess', _31 => _31.type]) !== "StringLiteral")
|
|
384
398
|
continue;
|
|
385
399
|
const name = nameNode.value;
|
|
386
400
|
if (!name || name.startsWith("_"))
|
|
@@ -424,13 +438,13 @@ async function transformDirective(code, transformer2, s, ctx, sfcPath) {
|
|
|
424
438
|
const results = await (transformer2 === "vue2" ? resolveVue22(code, s) : resolveVue32(code, s));
|
|
425
439
|
for (const { rawName, replace } of results) {
|
|
426
440
|
debug3(`| ${rawName}`);
|
|
427
|
-
const name = `${
|
|
441
|
+
const name = `${_chunkDNROZFEWcjs.DIRECTIVE_IMPORT_PREFIX}${_chunkDNROZFEWcjs.pascalCase.call(void 0, rawName)}`;
|
|
428
442
|
ctx.updateUsageMap(sfcPath, [name]);
|
|
429
443
|
const directive = await ctx.findComponent(name, "directive", [sfcPath]);
|
|
430
444
|
if (!directive)
|
|
431
445
|
continue;
|
|
432
446
|
const varName = `__unplugin_directives_${no}`;
|
|
433
|
-
s.prepend(`${
|
|
447
|
+
s.prepend(`${_chunkDNROZFEWcjs.stringifyComponentImport.call(void 0, { ...directive, as: varName }, ctx)};
|
|
434
448
|
`);
|
|
435
449
|
no += 1;
|
|
436
450
|
replace(varName);
|
|
@@ -449,7 +463,7 @@ function transformer(ctx, transformer2) {
|
|
|
449
463
|
await transformComponent(code, transformer2, s, ctx, sfcPath);
|
|
450
464
|
if (ctx.options.directives)
|
|
451
465
|
await transformDirective(code, transformer2, s, ctx, sfcPath);
|
|
452
|
-
s.prepend(
|
|
466
|
+
s.prepend(_chunkDNROZFEWcjs.DISABLE_COMMENT);
|
|
453
467
|
const result = { code: s.toString() };
|
|
454
468
|
if (ctx.sourcemap)
|
|
455
469
|
result.map = s.generateMap({ source: id, includeContent: true, hires: "boundary" });
|
|
@@ -469,7 +483,13 @@ var Context = (_class = class {
|
|
|
469
483
|
constructor(rawOptions) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);_class.prototype.__init10.call(this);
|
|
470
484
|
this.rawOptions = rawOptions;
|
|
471
485
|
this.options = resolveOptions(rawOptions, this.root);
|
|
472
|
-
this.
|
|
486
|
+
this.sourcemap = _nullishCoalesce(rawOptions.sourcemap, () => ( true));
|
|
487
|
+
this.generateDeclaration = _chunkDNROZFEWcjs.throttle.call(void 0, 500, this._generateDeclaration.bind(this), { noLeading: false });
|
|
488
|
+
if (this.options.dumpComponentsInfo) {
|
|
489
|
+
const dumpComponentsInfo = this.options.dumpComponentsInfo === true ? "./.components-info.json" : _nullishCoalesce(this.options.dumpComponentsInfo, () => ( false));
|
|
490
|
+
this.dumpComponentsInfoPath = dumpComponentsInfo;
|
|
491
|
+
this.generateComponentsJson = _chunkDNROZFEWcjs.throttle.call(void 0, 500, this._generateComponentsJson.bind(this), { noLeading: false });
|
|
492
|
+
}
|
|
473
493
|
this.setTransformer(this.options.transformer);
|
|
474
494
|
}
|
|
475
495
|
|
|
@@ -483,6 +503,7 @@ var Context = (_class = class {
|
|
|
483
503
|
__init7() {this.root = _process2.default.cwd()}
|
|
484
504
|
__init8() {this.sourcemap = true}
|
|
485
505
|
__init9() {this.alias = {}}
|
|
506
|
+
|
|
486
507
|
setRoot(root) {
|
|
487
508
|
if (this.root === root)
|
|
488
509
|
return;
|
|
@@ -495,7 +516,7 @@ var Context = (_class = class {
|
|
|
495
516
|
this.transformer = transformer(this, name || "vue3");
|
|
496
517
|
}
|
|
497
518
|
transform(code, id) {
|
|
498
|
-
const { path, query } =
|
|
519
|
+
const { path, query } = _chunkDNROZFEWcjs.parseId.call(void 0, id);
|
|
499
520
|
return this.transformer(code, id, path, query);
|
|
500
521
|
}
|
|
501
522
|
setupViteServer(server) {
|
|
@@ -507,16 +528,16 @@ var Context = (_class = class {
|
|
|
507
528
|
setupWatcher(watcher) {
|
|
508
529
|
const { globs } = this.options;
|
|
509
530
|
watcher.on("unlink", (path) => {
|
|
510
|
-
if (!
|
|
531
|
+
if (!_chunkDNROZFEWcjs.matchGlobs.call(void 0, path, globs))
|
|
511
532
|
return;
|
|
512
|
-
path =
|
|
533
|
+
path = _chunkDNROZFEWcjs.slash.call(void 0, path);
|
|
513
534
|
this.removeComponents(path);
|
|
514
535
|
this.onUpdate(path);
|
|
515
536
|
});
|
|
516
537
|
watcher.on("add", (path) => {
|
|
517
|
-
if (!
|
|
538
|
+
if (!_chunkDNROZFEWcjs.matchGlobs.call(void 0, path, globs))
|
|
518
539
|
return;
|
|
519
|
-
path =
|
|
540
|
+
path = _chunkDNROZFEWcjs.slash.call(void 0, path);
|
|
520
541
|
this.addComponents(path);
|
|
521
542
|
this.onUpdate(path);
|
|
522
543
|
});
|
|
@@ -527,16 +548,16 @@ var Context = (_class = class {
|
|
|
527
548
|
setupWatcherWebpack(watcher, emitUpdate) {
|
|
528
549
|
const { globs } = this.options;
|
|
529
550
|
watcher.on("unlink", (path) => {
|
|
530
|
-
if (!
|
|
551
|
+
if (!_chunkDNROZFEWcjs.matchGlobs.call(void 0, path, globs))
|
|
531
552
|
return;
|
|
532
|
-
path =
|
|
553
|
+
path = _chunkDNROZFEWcjs.slash.call(void 0, path);
|
|
533
554
|
this.removeComponents(path);
|
|
534
555
|
emitUpdate(path, "unlink");
|
|
535
556
|
});
|
|
536
557
|
watcher.on("add", (path) => {
|
|
537
|
-
if (!
|
|
558
|
+
if (!_chunkDNROZFEWcjs.matchGlobs.call(void 0, path, globs))
|
|
538
559
|
return;
|
|
539
|
-
path =
|
|
560
|
+
path = _chunkDNROZFEWcjs.slash.call(void 0, path);
|
|
540
561
|
this.addComponents(path);
|
|
541
562
|
emitUpdate(path, "add");
|
|
542
563
|
});
|
|
@@ -556,7 +577,7 @@ var Context = (_class = class {
|
|
|
556
577
|
addComponents(paths) {
|
|
557
578
|
debug5.components("add", paths);
|
|
558
579
|
const size = this._componentPaths.size;
|
|
559
|
-
|
|
580
|
+
_chunkDNROZFEWcjs.toArray.call(void 0, paths).forEach((p) => this._componentPaths.add(p));
|
|
560
581
|
if (this._componentPaths.size !== size) {
|
|
561
582
|
this.updateComponentNameMap();
|
|
562
583
|
return true;
|
|
@@ -574,7 +595,7 @@ var Context = (_class = class {
|
|
|
574
595
|
removeComponents(paths) {
|
|
575
596
|
debug5.components("remove", paths);
|
|
576
597
|
const size = this._componentPaths.size;
|
|
577
|
-
|
|
598
|
+
_chunkDNROZFEWcjs.toArray.call(void 0, paths).forEach((p) => this._componentPaths.delete(p));
|
|
578
599
|
if (this._componentPaths.size !== size) {
|
|
579
600
|
this.updateComponentNameMap();
|
|
580
601
|
return true;
|
|
@@ -583,6 +604,7 @@ var Context = (_class = class {
|
|
|
583
604
|
}
|
|
584
605
|
onUpdate(path) {
|
|
585
606
|
this.generateDeclaration();
|
|
607
|
+
this.generateComponentsJson();
|
|
586
608
|
if (!this._server)
|
|
587
609
|
return;
|
|
588
610
|
const payload = {
|
|
@@ -590,10 +612,10 @@ var Context = (_class = class {
|
|
|
590
612
|
updates: []
|
|
591
613
|
};
|
|
592
614
|
const timestamp = +/* @__PURE__ */ new Date();
|
|
593
|
-
const name =
|
|
615
|
+
const name = _chunkDNROZFEWcjs.pascalCase.call(void 0, _chunkDNROZFEWcjs.getNameFromFilePath.call(void 0, path, this.options));
|
|
594
616
|
Object.entries(this._componentUsageMap).forEach(([key, values]) => {
|
|
595
617
|
if (values.has(name)) {
|
|
596
|
-
const r = `/${
|
|
618
|
+
const r = `/${_chunkDNROZFEWcjs.slash.call(void 0, _path.relative.call(void 0, this.root, key))}`;
|
|
597
619
|
payload.updates.push({
|
|
598
620
|
acceptedPath: r,
|
|
599
621
|
path: r,
|
|
@@ -608,8 +630,8 @@ var Context = (_class = class {
|
|
|
608
630
|
updateComponentNameMap() {
|
|
609
631
|
this._componentNameMap = {};
|
|
610
632
|
Array.from(this._componentPaths).forEach((path) => {
|
|
611
|
-
const name =
|
|
612
|
-
if (
|
|
633
|
+
const name = _chunkDNROZFEWcjs.pascalCase.call(void 0, _chunkDNROZFEWcjs.getNameFromFilePath.call(void 0, path, this.options));
|
|
634
|
+
if (_chunkDNROZFEWcjs.isExclude.call(void 0, name, this.options.excludeNames)) {
|
|
613
635
|
debug5.components("exclude", name);
|
|
614
636
|
return;
|
|
615
637
|
}
|
|
@@ -630,7 +652,7 @@ var Context = (_class = class {
|
|
|
630
652
|
for (const resolver of this.options.resolvers) {
|
|
631
653
|
if (resolver.type !== type)
|
|
632
654
|
continue;
|
|
633
|
-
const result = await resolver.resolve(type === "directive" ? name.slice(
|
|
655
|
+
const result = await resolver.resolve(type === "directive" ? name.slice(_chunkDNROZFEWcjs.DIRECTIVE_IMPORT_PREFIX.length) : name);
|
|
634
656
|
if (!result)
|
|
635
657
|
continue;
|
|
636
658
|
if (typeof result === "string") {
|
|
@@ -641,7 +663,7 @@ var Context = (_class = class {
|
|
|
641
663
|
} else {
|
|
642
664
|
info = {
|
|
643
665
|
as: name,
|
|
644
|
-
...
|
|
666
|
+
..._chunkDNROZFEWcjs.normalizeComponentInfo.call(void 0, result)
|
|
645
667
|
};
|
|
646
668
|
}
|
|
647
669
|
if (type === "component")
|
|
@@ -653,12 +675,12 @@ var Context = (_class = class {
|
|
|
653
675
|
return void 0;
|
|
654
676
|
}
|
|
655
677
|
normalizePath(path) {
|
|
656
|
-
return
|
|
678
|
+
return _chunkDNROZFEWcjs.resolveAlias.call(void 0, path, _optionalChain([this, 'access', _32 => _32.viteConfig, 'optionalAccess', _33 => _33.resolve, 'optionalAccess', _34 => _34.alias]) || _optionalChain([this, 'access', _35 => _35.viteConfig, 'optionalAccess', _36 => _36.alias]) || []);
|
|
657
679
|
}
|
|
658
680
|
relative(path) {
|
|
659
681
|
if (path.startsWith("/") && !path.startsWith(this.root))
|
|
660
|
-
return
|
|
661
|
-
return
|
|
682
|
+
return _chunkDNROZFEWcjs.slash.call(void 0, path.slice(1));
|
|
683
|
+
return _chunkDNROZFEWcjs.slash.call(void 0, _path.relative.call(void 0, this.root, path));
|
|
662
684
|
}
|
|
663
685
|
__init10() {this._searched = false}
|
|
664
686
|
/**
|
|
@@ -676,12 +698,21 @@ var Context = (_class = class {
|
|
|
676
698
|
_generateDeclaration(removeUnused = !this._server) {
|
|
677
699
|
if (!this.options.dts)
|
|
678
700
|
return;
|
|
679
|
-
debug5.declaration("generating");
|
|
701
|
+
debug5.declaration("generating dts");
|
|
680
702
|
return writeDeclaration(this, this.options.dts, removeUnused);
|
|
681
703
|
}
|
|
682
704
|
generateDeclaration(removeUnused = !this._server) {
|
|
683
705
|
this._generateDeclaration(removeUnused);
|
|
684
706
|
}
|
|
707
|
+
_generateComponentsJson(removeUnused = !this._server) {
|
|
708
|
+
if (!Object.keys(this._componentNameMap).length)
|
|
709
|
+
return;
|
|
710
|
+
debug5.components("generating components-info");
|
|
711
|
+
return writeComponentsJson(this, removeUnused);
|
|
712
|
+
}
|
|
713
|
+
generateComponentsJson(removeUnused = !this._server) {
|
|
714
|
+
this._generateComponentsJson(removeUnused);
|
|
715
|
+
}
|
|
685
716
|
get componentNameMap() {
|
|
686
717
|
return this._componentNameMap;
|
|
687
718
|
}
|
|
@@ -697,7 +728,13 @@ var Context = (_class = class {
|
|
|
697
728
|
var PLUGIN_NAME = "unplugin:webpack";
|
|
698
729
|
var unplugin_default = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
699
730
|
const filter = _unpluginutils.createFilter.call(void 0,
|
|
700
|
-
options.include || [
|
|
731
|
+
options.include || [
|
|
732
|
+
/\.vue$/,
|
|
733
|
+
/\.vue\?vue/,
|
|
734
|
+
/\.vue\.[tj]sx?\?vue/,
|
|
735
|
+
// for vue-loader with experimentalInlineMatchResource enabled
|
|
736
|
+
/\.vue\?v=/
|
|
737
|
+
],
|
|
701
738
|
options.exclude || [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/]
|
|
702
739
|
);
|
|
703
740
|
const ctx = new Context(options);
|
|
@@ -706,7 +743,7 @@ var unplugin_default = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
706
743
|
return await ctx.findComponent(name, "component", filename ? [filename] : []);
|
|
707
744
|
},
|
|
708
745
|
stringifyImport(info) {
|
|
709
|
-
return
|
|
746
|
+
return _chunkDNROZFEWcjs.stringifyComponentImport.call(void 0, info, ctx);
|
|
710
747
|
}
|
|
711
748
|
};
|
|
712
749
|
return {
|
|
@@ -717,11 +754,12 @@ var unplugin_default = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
717
754
|
return filter(id);
|
|
718
755
|
},
|
|
719
756
|
async transform(code, id) {
|
|
720
|
-
if (!
|
|
757
|
+
if (!_chunkDNROZFEWcjs.shouldTransform.call(void 0, code))
|
|
721
758
|
return null;
|
|
722
759
|
try {
|
|
723
760
|
const result = await ctx.transform(code, id);
|
|
724
761
|
ctx.generateDeclaration();
|
|
762
|
+
ctx.generateComponentsJson();
|
|
725
763
|
return result;
|
|
726
764
|
} catch (e) {
|
|
727
765
|
this.error(e);
|
|
@@ -738,6 +776,10 @@ var unplugin_default = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
738
776
|
if (!_fs.existsSync.call(void 0, ctx.options.dts))
|
|
739
777
|
ctx.generateDeclaration();
|
|
740
778
|
}
|
|
779
|
+
if (ctx.options.dumpComponentsInfo && ctx.dumpComponentsInfoPath) {
|
|
780
|
+
if (!_fs.existsSync.call(void 0, ctx.dumpComponentsInfoPath))
|
|
781
|
+
ctx.generateComponentsJson();
|
|
782
|
+
}
|
|
741
783
|
if (config.build.watch && config.command === "build")
|
|
742
784
|
ctx.setupWatcher(_chokidar2.default.watch(ctx.options.globs));
|
|
743
785
|
},
|
|
@@ -216,7 +216,7 @@ var require_brace_expansion = __commonJS({
|
|
|
216
216
|
import { parse } from "node:path";
|
|
217
217
|
import process2 from "node:process";
|
|
218
218
|
|
|
219
|
-
// node_modules/.pnpm/@antfu+utils@9.
|
|
219
|
+
// node_modules/.pnpm/@antfu+utils@9.2.0/node_modules/@antfu/utils/dist/index.mjs
|
|
220
220
|
function toArray(array) {
|
|
221
221
|
array = array ?? [];
|
|
222
222
|
return Array.isArray(array) ? array : [array];
|
|
@@ -224,10 +224,10 @@ function toArray(array) {
|
|
|
224
224
|
function notNullish(v) {
|
|
225
225
|
return v != null;
|
|
226
226
|
}
|
|
227
|
-
var VOID = Symbol("p-void");
|
|
228
227
|
function slash(str) {
|
|
229
228
|
return str.replace(/\\/g, "/");
|
|
230
229
|
}
|
|
230
|
+
var VOID = Symbol("p-void");
|
|
231
231
|
function throttle$1(delay, callback, options) {
|
|
232
232
|
var _ref = options || {}, _ref$noTrailing = _ref.noTrailing, noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing, _ref$noLeading = _ref.noLeading, noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading, _ref$debounceMode = _ref.debounceMode, debounceMode = _ref$debounceMode === void 0 ? void 0 : _ref$debounceMode;
|
|
233
233
|
var timeoutID;
|
|
@@ -216,7 +216,7 @@ var require_brace_expansion = _chunk3HT76LNNcjs.__commonJS.call(void 0, {
|
|
|
216
216
|
var _path = require('path');
|
|
217
217
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
218
218
|
|
|
219
|
-
// node_modules/.pnpm/@antfu+utils@9.
|
|
219
|
+
// node_modules/.pnpm/@antfu+utils@9.2.0/node_modules/@antfu/utils/dist/index.mjs
|
|
220
220
|
function toArray(array) {
|
|
221
221
|
array = _nullishCoalesce(array, () => ( []));
|
|
222
222
|
return Array.isArray(array) ? array : [array];
|
|
@@ -224,10 +224,10 @@ function toArray(array) {
|
|
|
224
224
|
function notNullish(v) {
|
|
225
225
|
return v != null;
|
|
226
226
|
}
|
|
227
|
-
var VOID = Symbol("p-void");
|
|
228
227
|
function slash(str) {
|
|
229
228
|
return str.replace(/\\/g, "/");
|
|
230
229
|
}
|
|
230
|
+
var VOID = Symbol("p-void");
|
|
231
231
|
function throttle$1(delay, callback, options) {
|
|
232
232
|
var _ref = options || {}, _ref$noTrailing = _ref.noTrailing, noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing, _ref$noLeading = _ref.noLeading, noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading, _ref$debounceMode = _ref.debounceMode, debounceMode = _ref$debounceMode === void 0 ? void 0 : _ref$debounceMode;
|
|
233
233
|
var timeoutID;
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
stringifyComponentImport,
|
|
16
16
|
throttle,
|
|
17
17
|
toArray
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AXRVJ5GF.js";
|
|
19
19
|
|
|
20
20
|
// src/core/unplugin.ts
|
|
21
21
|
import { existsSync as existsSync2 } from "node:fs";
|
|
@@ -167,6 +167,22 @@ async function writeDeclaration(ctx, filepath, removeUnused = false) {
|
|
|
167
167
|
if (code !== originalContent)
|
|
168
168
|
await writeFile(filepath, code);
|
|
169
169
|
}
|
|
170
|
+
async function writeComponentsJson(ctx, _removeUnused = false) {
|
|
171
|
+
if (!ctx.dumpComponentsInfoPath)
|
|
172
|
+
return;
|
|
173
|
+
const components = [
|
|
174
|
+
...Object.entries({
|
|
175
|
+
...ctx.componentNameMap,
|
|
176
|
+
...ctx.componentCustomMap
|
|
177
|
+
}).map(([_, { name, as, from }]) => ({
|
|
178
|
+
name: name || "default",
|
|
179
|
+
as,
|
|
180
|
+
from
|
|
181
|
+
})),
|
|
182
|
+
...resolveTypeImports(ctx.options.types)
|
|
183
|
+
];
|
|
184
|
+
await writeFile(ctx.dumpComponentsInfoPath, JSON.stringify(components, null, 2));
|
|
185
|
+
}
|
|
170
186
|
|
|
171
187
|
// src/core/fs/glob.ts
|
|
172
188
|
import Debug from "debug";
|
|
@@ -234,8 +250,6 @@ function resolveOptions(options, root) {
|
|
|
234
250
|
if (!resolved.extensions.length)
|
|
235
251
|
throw new Error("[unplugin-vue-components] `extensions` option is required to search for components");
|
|
236
252
|
}
|
|
237
|
-
if (!resolved.globsExclude)
|
|
238
|
-
resolved.globsExclude = [`**/node_modules/**`];
|
|
239
253
|
resolved.globsExclude = toArray(resolved.globsExclude || []).map((i) => resolveGlobsExclude(root, i));
|
|
240
254
|
resolved.globs = resolved.globs.filter((i) => {
|
|
241
255
|
if (!i.startsWith("!"))
|
|
@@ -469,7 +483,13 @@ var Context = class {
|
|
|
469
483
|
constructor(rawOptions) {
|
|
470
484
|
this.rawOptions = rawOptions;
|
|
471
485
|
this.options = resolveOptions(rawOptions, this.root);
|
|
486
|
+
this.sourcemap = rawOptions.sourcemap ?? true;
|
|
472
487
|
this.generateDeclaration = throttle(500, this._generateDeclaration.bind(this), { noLeading: false });
|
|
488
|
+
if (this.options.dumpComponentsInfo) {
|
|
489
|
+
const dumpComponentsInfo = this.options.dumpComponentsInfo === true ? "./.components-info.json" : this.options.dumpComponentsInfo ?? false;
|
|
490
|
+
this.dumpComponentsInfoPath = dumpComponentsInfo;
|
|
491
|
+
this.generateComponentsJson = throttle(500, this._generateComponentsJson.bind(this), { noLeading: false });
|
|
492
|
+
}
|
|
473
493
|
this.setTransformer(this.options.transformer);
|
|
474
494
|
}
|
|
475
495
|
options;
|
|
@@ -483,6 +503,7 @@ var Context = class {
|
|
|
483
503
|
root = process.cwd();
|
|
484
504
|
sourcemap = true;
|
|
485
505
|
alias = {};
|
|
506
|
+
dumpComponentsInfoPath;
|
|
486
507
|
setRoot(root) {
|
|
487
508
|
if (this.root === root)
|
|
488
509
|
return;
|
|
@@ -583,6 +604,7 @@ var Context = class {
|
|
|
583
604
|
}
|
|
584
605
|
onUpdate(path) {
|
|
585
606
|
this.generateDeclaration();
|
|
607
|
+
this.generateComponentsJson();
|
|
586
608
|
if (!this._server)
|
|
587
609
|
return;
|
|
588
610
|
const payload = {
|
|
@@ -676,12 +698,21 @@ var Context = class {
|
|
|
676
698
|
_generateDeclaration(removeUnused = !this._server) {
|
|
677
699
|
if (!this.options.dts)
|
|
678
700
|
return;
|
|
679
|
-
debug5.declaration("generating");
|
|
701
|
+
debug5.declaration("generating dts");
|
|
680
702
|
return writeDeclaration(this, this.options.dts, removeUnused);
|
|
681
703
|
}
|
|
682
704
|
generateDeclaration(removeUnused = !this._server) {
|
|
683
705
|
this._generateDeclaration(removeUnused);
|
|
684
706
|
}
|
|
707
|
+
_generateComponentsJson(removeUnused = !this._server) {
|
|
708
|
+
if (!Object.keys(this._componentNameMap).length)
|
|
709
|
+
return;
|
|
710
|
+
debug5.components("generating components-info");
|
|
711
|
+
return writeComponentsJson(this, removeUnused);
|
|
712
|
+
}
|
|
713
|
+
generateComponentsJson(removeUnused = !this._server) {
|
|
714
|
+
this._generateComponentsJson(removeUnused);
|
|
715
|
+
}
|
|
685
716
|
get componentNameMap() {
|
|
686
717
|
return this._componentNameMap;
|
|
687
718
|
}
|
|
@@ -697,7 +728,13 @@ var Context = class {
|
|
|
697
728
|
var PLUGIN_NAME = "unplugin:webpack";
|
|
698
729
|
var unplugin_default = createUnplugin((options = {}) => {
|
|
699
730
|
const filter = createFilter(
|
|
700
|
-
options.include || [
|
|
731
|
+
options.include || [
|
|
732
|
+
/\.vue$/,
|
|
733
|
+
/\.vue\?vue/,
|
|
734
|
+
/\.vue\.[tj]sx?\?vue/,
|
|
735
|
+
// for vue-loader with experimentalInlineMatchResource enabled
|
|
736
|
+
/\.vue\?v=/
|
|
737
|
+
],
|
|
701
738
|
options.exclude || [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/]
|
|
702
739
|
);
|
|
703
740
|
const ctx = new Context(options);
|
|
@@ -722,6 +759,7 @@ var unplugin_default = createUnplugin((options = {}) => {
|
|
|
722
759
|
try {
|
|
723
760
|
const result = await ctx.transform(code, id);
|
|
724
761
|
ctx.generateDeclaration();
|
|
762
|
+
ctx.generateComponentsJson();
|
|
725
763
|
return result;
|
|
726
764
|
} catch (e) {
|
|
727
765
|
this.error(e);
|
|
@@ -738,6 +776,10 @@ var unplugin_default = createUnplugin((options = {}) => {
|
|
|
738
776
|
if (!existsSync2(ctx.options.dts))
|
|
739
777
|
ctx.generateDeclaration();
|
|
740
778
|
}
|
|
779
|
+
if (ctx.options.dumpComponentsInfo && ctx.dumpComponentsInfoPath) {
|
|
780
|
+
if (!existsSync2(ctx.dumpComponentsInfoPath))
|
|
781
|
+
ctx.generateComponentsJson();
|
|
782
|
+
}
|
|
741
783
|
if (config.build.watch && config.command === "build")
|
|
742
784
|
ctx.setupWatcher(chokidar.watch(ctx.options.globs));
|
|
743
785
|
},
|
package/dist/esbuild.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk2L7VET54cjs = require('./chunk-2L7VET54.cjs');
|
|
4
|
+
require('./chunk-DNROZFEW.cjs');
|
|
5
5
|
require('./chunk-3HT76LNN.cjs');
|
|
6
6
|
require('./chunk-ZBPRDZS4.cjs');
|
|
7
7
|
|
|
8
8
|
// src/esbuild.ts
|
|
9
|
-
var esbuild_default =
|
|
9
|
+
var esbuild_default = _chunk2L7VET54cjs.unplugin_default.esbuild;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.default = esbuild_default;
|
package/dist/esbuild.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2L7VET54cjs = require('./chunk-2L7VET54.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkDNROZFEWcjs = require('./chunk-DNROZFEW.cjs');
|
|
9
9
|
require('./chunk-3HT76LNN.cjs');
|
|
10
10
|
require('./chunk-ZBPRDZS4.cjs');
|
|
11
11
|
|
|
@@ -13,4 +13,4 @@ require('./chunk-ZBPRDZS4.cjs');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.camelCase =
|
|
16
|
+
exports.camelCase = _chunkDNROZFEWcjs.camelCase; exports.default = _chunk2L7VET54cjs.unplugin_default; exports.kebabCase = _chunkDNROZFEWcjs.kebabCase; exports.pascalCase = _chunkDNROZFEWcjs.pascalCase;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unplugin_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NY5XDZK3.js";
|
|
4
4
|
import {
|
|
5
5
|
camelCase,
|
|
6
6
|
kebabCase,
|
|
7
7
|
pascalCase
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AXRVJ5GF.js";
|
|
9
9
|
import "./chunk-QGM4M3NI.js";
|
|
10
10
|
import "./chunk-6F4PWJZI.js";
|
|
11
11
|
export {
|
package/dist/nuxt.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk2L7VET54cjs = require('./chunk-2L7VET54.cjs');
|
|
4
|
+
require('./chunk-DNROZFEW.cjs');
|
|
5
5
|
require('./chunk-3HT76LNN.cjs');
|
|
6
6
|
require('./chunk-ZBPRDZS4.cjs');
|
|
7
7
|
|
|
@@ -9,8 +9,8 @@ require('./chunk-ZBPRDZS4.cjs');
|
|
|
9
9
|
var _kit = require('@nuxt/kit');
|
|
10
10
|
var nuxt_default = _kit.defineNuxtModule.call(void 0, {
|
|
11
11
|
setup(options) {
|
|
12
|
-
_kit.addWebpackPlugin.call(void 0,
|
|
13
|
-
_kit.addVitePlugin.call(void 0,
|
|
12
|
+
_kit.addWebpackPlugin.call(void 0, _chunk2L7VET54cjs.unplugin_default.webpack(options));
|
|
13
|
+
_kit.addVitePlugin.call(void 0, _chunk2L7VET54cjs.unplugin_default.vite(options));
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
package/dist/nuxt.js
CHANGED
package/dist/resolvers.cjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkDNROZFEWcjs = require('./chunk-DNROZFEW.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunk3HT76LNNcjs = require('./chunk-3HT76LNN.cjs');
|
|
@@ -220,7 +220,7 @@ function getStyleDir(compName) {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
if (!styleDir)
|
|
223
|
-
styleDir =
|
|
223
|
+
styleDir = _chunkDNROZFEWcjs.kebabCase.call(void 0, compName);
|
|
224
224
|
return styleDir;
|
|
225
225
|
}
|
|
226
226
|
function getSideEffects(compName, options) {
|
|
@@ -405,7 +405,7 @@ var matchComponents2 = [
|
|
|
405
405
|
function getComponentStyleDir(importName, importStyle) {
|
|
406
406
|
if (["ConfigProvider", "Icon"].includes(importName))
|
|
407
407
|
return void 0;
|
|
408
|
-
let componentDir =
|
|
408
|
+
let componentDir = _chunkDNROZFEWcjs.kebabCase.call(void 0, importName);
|
|
409
409
|
for (const item of matchComponents2) {
|
|
410
410
|
if (item.pattern.test(importName)) {
|
|
411
411
|
componentDir = item.componentDir;
|
|
@@ -441,7 +441,7 @@ function ArcoResolver(options = {}) {
|
|
|
441
441
|
type: "component",
|
|
442
442
|
resolve: (name) => {
|
|
443
443
|
if (canResolveIcons(options.resolveIcons)) {
|
|
444
|
-
const iconPrefix =
|
|
444
|
+
const iconPrefix = _chunkDNROZFEWcjs.pascalCase.call(void 0, getResolveIconPrefix(options.resolveIcons));
|
|
445
445
|
const newNameRegexp = new RegExp(`^${iconPrefix}Icon`);
|
|
446
446
|
if (newNameRegexp.test(name)) {
|
|
447
447
|
debug("found icon component name %s", name);
|
|
@@ -454,7 +454,7 @@ function ArcoResolver(options = {}) {
|
|
|
454
454
|
};
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
if (name.match(/^A[A-Z]/) && !
|
|
457
|
+
if (name.match(/^A[A-Z]/) && !_chunkDNROZFEWcjs.isExclude.call(void 0, name, options.exclude)) {
|
|
458
458
|
const importStyle = _nullishCoalesce(options.importStyle, () => ( "css"));
|
|
459
459
|
const importName = name.slice(1);
|
|
460
460
|
const config = {
|
|
@@ -618,7 +618,7 @@ function getSideEffects2(name, filename) {
|
|
|
618
618
|
function componentsResolver(name, { ssr }) {
|
|
619
619
|
if (!name.match(/^D[A-Z]/))
|
|
620
620
|
return;
|
|
621
|
-
const resolveId =
|
|
621
|
+
const resolveId = _chunkDNROZFEWcjs.kebabCase.call(void 0, name = name.slice(1));
|
|
622
622
|
return {
|
|
623
623
|
name,
|
|
624
624
|
sideEffects: getSideEffects2(resolveId, "style.css"),
|
|
@@ -626,7 +626,7 @@ function componentsResolver(name, { ssr }) {
|
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
628
|
function directivesResolver(name, { ssr }) {
|
|
629
|
-
const resolveId =
|
|
629
|
+
const resolveId = _chunkDNROZFEWcjs.kebabCase.call(void 0, name);
|
|
630
630
|
return {
|
|
631
631
|
name: `${name}Directive`,
|
|
632
632
|
sideEffects: getSideEffects2(resolveId, "style.css"),
|
|
@@ -767,7 +767,7 @@ function resolveComponent(name, options) {
|
|
|
767
767
|
from: "@element-plus/icons-vue"
|
|
768
768
|
};
|
|
769
769
|
}
|
|
770
|
-
const partialName =
|
|
770
|
+
const partialName = _chunkDNROZFEWcjs.kebabCase.call(void 0, name.slice(2));
|
|
771
771
|
const { version, ssr, nightly } = options;
|
|
772
772
|
if (compare(version, "1.1.0-beta.1", ">=") || nightly) {
|
|
773
773
|
return {
|
|
@@ -815,7 +815,7 @@ function ElementPlusResolver(options = {}) {
|
|
|
815
815
|
return optionsResolved;
|
|
816
816
|
optionsResolved = {
|
|
817
817
|
ssr: false,
|
|
818
|
-
version: await
|
|
818
|
+
version: await _chunkDNROZFEWcjs.getPkgVersion.call(void 0, "element-plus", "2.2.2"),
|
|
819
819
|
importStyle: "css",
|
|
820
820
|
directives: true,
|
|
821
821
|
exclude: void 0,
|
|
@@ -869,7 +869,7 @@ function ElementUiResolver(options = {}) {
|
|
|
869
869
|
return;
|
|
870
870
|
if (/^El[A-Z]/.test(name)) {
|
|
871
871
|
const compName = name.slice(2);
|
|
872
|
-
const partialName =
|
|
872
|
+
const partialName = _chunkDNROZFEWcjs.kebabCase.call(void 0, compName);
|
|
873
873
|
if (partialName === "collapse-transition") {
|
|
874
874
|
return {
|
|
875
875
|
from: `element-ui/lib/transitions/${partialName}`
|
|
@@ -984,11 +984,11 @@ function IduxResolver(options = {}) {
|
|
|
984
984
|
const packageName = getPackageName(name);
|
|
985
985
|
if (!packageName)
|
|
986
986
|
return;
|
|
987
|
-
const resolvedVersion = await
|
|
987
|
+
const resolvedVersion = await _chunkDNROZFEWcjs.getPkgVersion.call(void 0, `${scope}/${packageName}`, "2.0.0");
|
|
988
988
|
let dirname = specialComponents[name];
|
|
989
989
|
if (!dirname) {
|
|
990
990
|
const nameIndex = packageName === "pro" ? 2 : 1;
|
|
991
|
-
dirname =
|
|
991
|
+
dirname = _chunkDNROZFEWcjs.kebabCase.call(void 0, name).split("-")[nameIndex];
|
|
992
992
|
}
|
|
993
993
|
const path = `${scope}/${packageName}/${dirname}`;
|
|
994
994
|
const sideEffects = packageName === "cdk" ? void 0 : getSideEffects5(resolvedVersion, path, importStyle, importStyleTheme);
|
|
@@ -1251,7 +1251,7 @@ function getSideEffects6(importName, options) {
|
|
|
1251
1251
|
}
|
|
1252
1252
|
function resolveComponent2(importName, options) {
|
|
1253
1253
|
let name;
|
|
1254
|
-
if (
|
|
1254
|
+
if (_chunkDNROZFEWcjs.isExclude.call(void 0, importName, options.exclude))
|
|
1255
1255
|
return void 0;
|
|
1256
1256
|
if (options.resolveIcons && importName.match(iconsRE)) {
|
|
1257
1257
|
name = importName;
|
|
@@ -1450,7 +1450,7 @@ function TDesignResolver(options = {}) {
|
|
|
1450
1450
|
resolve: (name) => {
|
|
1451
1451
|
const { library = "vue", exclude } = options;
|
|
1452
1452
|
const importFrom = options.esm ? "/esm" : "";
|
|
1453
|
-
if (
|
|
1453
|
+
if (_chunkDNROZFEWcjs.isExclude.call(void 0, name, exclude))
|
|
1454
1454
|
return;
|
|
1455
1455
|
if (options.resolveIcons && name.match(/[a-z]Icon$/)) {
|
|
1456
1456
|
return {
|
|
@@ -1476,10 +1476,10 @@ function TDesignResolver(options = {}) {
|
|
|
1476
1476
|
}
|
|
1477
1477
|
|
|
1478
1478
|
// src/core/resolvers/vant.ts
|
|
1479
|
-
var moduleType =
|
|
1479
|
+
var moduleType = _chunkDNROZFEWcjs.isSSR ? "lib" : "es";
|
|
1480
1480
|
function getSideEffects7(dirName, options) {
|
|
1481
1481
|
const { importStyle = true } = options;
|
|
1482
|
-
if (!importStyle ||
|
|
1482
|
+
if (!importStyle || _chunkDNROZFEWcjs.isSSR)
|
|
1483
1483
|
return;
|
|
1484
1484
|
if (importStyle === "less")
|
|
1485
1485
|
return `vant/${moduleType}/${dirName}/style/less`;
|
|
@@ -1496,7 +1496,7 @@ function VantResolver(options = {}) {
|
|
|
1496
1496
|
return {
|
|
1497
1497
|
name: partialName,
|
|
1498
1498
|
from: `vant/${moduleType}`,
|
|
1499
|
-
sideEffects: getSideEffects7(
|
|
1499
|
+
sideEffects: getSideEffects7(_chunkDNROZFEWcjs.kebabCase.call(void 0, partialName), options)
|
|
1500
1500
|
};
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
@@ -1519,9 +1519,9 @@ function getResolved(name, options) {
|
|
|
1519
1519
|
const sideEffects = [];
|
|
1520
1520
|
if (importStyle || importCss) {
|
|
1521
1521
|
if (importStyle === "less" || importLess)
|
|
1522
|
-
sideEffects.push(`${path}/es/${
|
|
1522
|
+
sideEffects.push(`${path}/es/${_chunkDNROZFEWcjs.kebabCase.call(void 0, name)}/style/less`);
|
|
1523
1523
|
else
|
|
1524
|
-
sideEffects.push(`${path}/es/${
|
|
1524
|
+
sideEffects.push(`${path}/es/${_chunkDNROZFEWcjs.kebabCase.call(void 0, name)}/style/index${styleExtname}`);
|
|
1525
1525
|
}
|
|
1526
1526
|
return {
|
|
1527
1527
|
from: path,
|
|
@@ -1584,9 +1584,9 @@ function VeuiResolver(options = {}) {
|
|
|
1584
1584
|
};
|
|
1585
1585
|
}
|
|
1586
1586
|
var formatters = {
|
|
1587
|
-
"kebab-case":
|
|
1588
|
-
"camelCase":
|
|
1589
|
-
"PascalCase":
|
|
1587
|
+
"kebab-case": _chunkDNROZFEWcjs.kebabCase,
|
|
1588
|
+
"camelCase": _chunkDNROZFEWcjs.camelCase,
|
|
1589
|
+
"PascalCase": _chunkDNROZFEWcjs.pascalCase
|
|
1590
1590
|
};
|
|
1591
1591
|
var peerPaths = /* @__PURE__ */ new Map();
|
|
1592
1592
|
function assertPeerPath(peerPath) {
|
|
@@ -1646,12 +1646,12 @@ function getCompDir(compName) {
|
|
|
1646
1646
|
for (let i = 0; i < total; i++) {
|
|
1647
1647
|
const matcher = matchComponents4[i];
|
|
1648
1648
|
if (compName.match(matcher.pattern)) {
|
|
1649
|
-
compPath = `${matcher.compDir}/${
|
|
1649
|
+
compPath = `${matcher.compDir}/${_chunkDNROZFEWcjs.kebabCase.call(void 0, compName)}.vue`;
|
|
1650
1650
|
break;
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
1653
|
if (!compPath)
|
|
1654
|
-
compPath =
|
|
1654
|
+
compPath = _chunkDNROZFEWcjs.kebabCase.call(void 0, compName);
|
|
1655
1655
|
return compPath;
|
|
1656
1656
|
}
|
|
1657
1657
|
function ViewUiResolver() {
|
package/dist/resolvers.js
CHANGED
package/dist/rollup.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk2L7VET54cjs = require('./chunk-2L7VET54.cjs');
|
|
4
|
+
require('./chunk-DNROZFEW.cjs');
|
|
5
5
|
require('./chunk-3HT76LNN.cjs');
|
|
6
6
|
require('./chunk-ZBPRDZS4.cjs');
|
|
7
7
|
|
|
8
8
|
// src/rollup.ts
|
|
9
|
-
var rollup_default =
|
|
9
|
+
var rollup_default = _chunk2L7VET54cjs.unplugin_default.rollup;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.default = rollup_default;
|
package/dist/rollup.js
CHANGED
package/dist/rspack.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk2L7VET54cjs = require('./chunk-2L7VET54.cjs');
|
|
4
|
+
require('./chunk-DNROZFEW.cjs');
|
|
5
5
|
require('./chunk-3HT76LNN.cjs');
|
|
6
6
|
require('./chunk-ZBPRDZS4.cjs');
|
|
7
7
|
|
|
8
8
|
// src/rspack.ts
|
|
9
|
-
var rspack_default =
|
|
9
|
+
var rspack_default = _chunk2L7VET54cjs.unplugin_default.rspack;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.default = rspack_default;
|
package/dist/rspack.js
CHANGED
package/dist/types.d.cts
CHANGED
|
@@ -81,7 +81,7 @@ interface Options {
|
|
|
81
81
|
/**
|
|
82
82
|
* Negated glob patterns to exclude files from being detected as components.
|
|
83
83
|
*
|
|
84
|
-
* @default [
|
|
84
|
+
* @default []
|
|
85
85
|
*/
|
|
86
86
|
globsExclude?: string | string[];
|
|
87
87
|
/**
|
|
@@ -168,6 +168,21 @@ interface Options {
|
|
|
168
168
|
* Vue version of project. It will detect automatically if not specified.
|
|
169
169
|
*/
|
|
170
170
|
version?: 2 | 2.7 | 3;
|
|
171
|
+
/**
|
|
172
|
+
* Generate sourcemap for the transformed code.
|
|
173
|
+
*
|
|
174
|
+
* @default true
|
|
175
|
+
*/
|
|
176
|
+
sourcemap?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Save component information into a JSON file for other tools to consume.
|
|
179
|
+
* Provide a filepath to save the JSON file.
|
|
180
|
+
*
|
|
181
|
+
* When set to `true`, it will save to `./.components-info.json`
|
|
182
|
+
*
|
|
183
|
+
* @default false
|
|
184
|
+
*/
|
|
185
|
+
dumpComponentsInfo?: boolean | string;
|
|
171
186
|
}
|
|
172
187
|
type ResolvedOptions = Omit<Required<Options>, 'resolvers' | 'extensions' | 'dirs' | 'globalComponentsDeclaration'> & {
|
|
173
188
|
resolvers: ComponentResolverObject[];
|
package/dist/types.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ interface Options {
|
|
|
81
81
|
/**
|
|
82
82
|
* Negated glob patterns to exclude files from being detected as components.
|
|
83
83
|
*
|
|
84
|
-
* @default [
|
|
84
|
+
* @default []
|
|
85
85
|
*/
|
|
86
86
|
globsExclude?: string | string[];
|
|
87
87
|
/**
|
|
@@ -168,6 +168,21 @@ interface Options {
|
|
|
168
168
|
* Vue version of project. It will detect automatically if not specified.
|
|
169
169
|
*/
|
|
170
170
|
version?: 2 | 2.7 | 3;
|
|
171
|
+
/**
|
|
172
|
+
* Generate sourcemap for the transformed code.
|
|
173
|
+
*
|
|
174
|
+
* @default true
|
|
175
|
+
*/
|
|
176
|
+
sourcemap?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Save component information into a JSON file for other tools to consume.
|
|
179
|
+
* Provide a filepath to save the JSON file.
|
|
180
|
+
*
|
|
181
|
+
* When set to `true`, it will save to `./.components-info.json`
|
|
182
|
+
*
|
|
183
|
+
* @default false
|
|
184
|
+
*/
|
|
185
|
+
dumpComponentsInfo?: boolean | string;
|
|
171
186
|
}
|
|
172
187
|
type ResolvedOptions = Omit<Required<Options>, 'resolvers' | 'extensions' | 'dirs' | 'globalComponentsDeclaration'> & {
|
|
173
188
|
resolvers: ComponentResolverObject[];
|
package/dist/vite.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk2L7VET54cjs = require('./chunk-2L7VET54.cjs');
|
|
4
|
+
require('./chunk-DNROZFEW.cjs');
|
|
5
5
|
require('./chunk-3HT76LNN.cjs');
|
|
6
6
|
require('./chunk-ZBPRDZS4.cjs');
|
|
7
7
|
|
|
8
8
|
// src/vite.ts
|
|
9
|
-
var vite_default =
|
|
9
|
+
var vite_default = _chunk2L7VET54cjs.unplugin_default.vite;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.default = vite_default;
|
package/dist/vite.js
CHANGED
package/dist/webpack.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk2L7VET54cjs = require('./chunk-2L7VET54.cjs');
|
|
4
|
+
require('./chunk-DNROZFEW.cjs');
|
|
5
5
|
require('./chunk-3HT76LNN.cjs');
|
|
6
6
|
require('./chunk-ZBPRDZS4.cjs');
|
|
7
7
|
|
|
8
8
|
// src/webpack.ts
|
|
9
|
-
var webpack_default =
|
|
9
|
+
var webpack_default = _chunk2L7VET54cjs.unplugin_default.webpack;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.default = webpack_default;
|
package/dist/webpack.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-vue-components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "28.
|
|
4
|
+
"version": "28.5.0",
|
|
5
|
+
"packageManager": "pnpm@10.8.0",
|
|
5
6
|
"description": "Components auto importing for Vue",
|
|
6
7
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
8
|
"license": "MIT",
|
|
@@ -67,6 +68,17 @@
|
|
|
67
68
|
"engines": {
|
|
68
69
|
"node": ">=14"
|
|
69
70
|
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "tsup",
|
|
73
|
+
"dev": "tsup --watch src",
|
|
74
|
+
"example:build": "npm -C examples/vite-vue3 run build",
|
|
75
|
+
"example:dev": "npm -C examples/vite-vue3 run dev",
|
|
76
|
+
"prepublishOnly": "npm run build",
|
|
77
|
+
"lint": "eslint .",
|
|
78
|
+
"release": "bumpp && npm publish",
|
|
79
|
+
"test": "vitest",
|
|
80
|
+
"test:update": "vitest --u"
|
|
81
|
+
},
|
|
70
82
|
"peerDependencies": {
|
|
71
83
|
"@babel/parser": "^7.15.8",
|
|
72
84
|
"@nuxt/kit": "^3.2.2",
|
|
@@ -83,48 +95,38 @@
|
|
|
83
95
|
"dependencies": {
|
|
84
96
|
"chokidar": "^3.6.0",
|
|
85
97
|
"debug": "^4.4.0",
|
|
86
|
-
"local-pkg": "^1.
|
|
98
|
+
"local-pkg": "^1.1.1",
|
|
87
99
|
"magic-string": "^0.30.17",
|
|
88
100
|
"mlly": "^1.7.4",
|
|
89
|
-
"tinyglobby": "^0.2.
|
|
90
|
-
"unplugin": "^2.2
|
|
101
|
+
"tinyglobby": "^0.2.12",
|
|
102
|
+
"unplugin": "^2.3.2",
|
|
91
103
|
"unplugin-utils": "^0.2.4"
|
|
92
104
|
},
|
|
93
105
|
"devDependencies": {
|
|
94
|
-
"@antfu/eslint-config": "^4.
|
|
95
|
-
"@antfu/utils": "^9.
|
|
96
|
-
"@babel/parser": "^7.
|
|
97
|
-
"@babel/types": "^7.
|
|
98
|
-
"@nuxt/kit": "^3.
|
|
99
|
-
"@nuxt/schema": "^3.
|
|
106
|
+
"@antfu/eslint-config": "^4.12.0",
|
|
107
|
+
"@antfu/utils": "^9.2.0",
|
|
108
|
+
"@babel/parser": "^7.27.0",
|
|
109
|
+
"@babel/types": "^7.27.0",
|
|
110
|
+
"@nuxt/kit": "^3.16.2",
|
|
111
|
+
"@nuxt/schema": "^3.16.2",
|
|
100
112
|
"@types/debug": "^4.1.12",
|
|
101
113
|
"@types/minimatch": "^5.1.2",
|
|
102
|
-
"@types/node": "^22.
|
|
103
|
-
"bumpp": "^10.0
|
|
114
|
+
"@types/node": "^22.14.1",
|
|
115
|
+
"bumpp": "^10.1.0",
|
|
104
116
|
"compare-versions": "^6.1.1",
|
|
105
|
-
"element-plus": "^2.9.
|
|
106
|
-
"eslint": "^9.
|
|
117
|
+
"element-plus": "^2.9.7",
|
|
118
|
+
"eslint": "^9.24.0",
|
|
107
119
|
"eslint-plugin-format": "^1.0.1",
|
|
108
120
|
"esno": "^4.8.0",
|
|
109
121
|
"estree-walker": "^3.0.3",
|
|
110
122
|
"minimatch": "^10.0.1",
|
|
111
123
|
"pathe": "^2.0.3",
|
|
112
|
-
"rollup": "^4.
|
|
113
|
-
"tsup": "^8.
|
|
114
|
-
"typescript": "^5.
|
|
115
|
-
"vite": "^6.
|
|
116
|
-
"vitest": "^3.
|
|
124
|
+
"rollup": "^4.40.0",
|
|
125
|
+
"tsup": "^8.4.0",
|
|
126
|
+
"typescript": "^5.8.3",
|
|
127
|
+
"vite": "^6.2.6",
|
|
128
|
+
"vitest": "^3.1.1",
|
|
117
129
|
"vue": "3.2.45",
|
|
118
|
-
"vue-tsc": "^2.2.
|
|
119
|
-
},
|
|
120
|
-
"scripts": {
|
|
121
|
-
"build": "tsup",
|
|
122
|
-
"dev": "tsup --watch src",
|
|
123
|
-
"example:build": "npm -C examples/vite-vue3 run build",
|
|
124
|
-
"example:dev": "npm -C examples/vite-vue3 run dev",
|
|
125
|
-
"lint": "eslint .",
|
|
126
|
-
"release": "bumpp && npm publish",
|
|
127
|
-
"test": "vitest",
|
|
128
|
-
"test:update": "vitest --u"
|
|
130
|
+
"vue-tsc": "^2.2.8"
|
|
129
131
|
}
|
|
130
|
-
}
|
|
132
|
+
}
|