unplugin-vue-components 28.2.0 → 28.4.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/dist/{chunk-OSRKQKTH.js → chunk-GDXMSVFX.js} +36 -13
- package/dist/{chunk-DBJDTE6J.cjs → chunk-Z44OFZ6M.cjs} +36 -13
- package/dist/esbuild.cjs +2 -2
- package/dist/esbuild.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/nuxt.cjs +3 -3
- package/dist/nuxt.js +1 -1
- package/dist/resolvers.cjs +6 -0
- package/dist/resolvers.js +6 -0
- package/dist/rollup.cjs +2 -2
- package/dist/rollup.js +1 -1
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +1 -1
- package/dist/types.d.cts +11 -1
- package/dist/types.d.ts +11 -1
- package/dist/vite.cjs +2 -2
- package/dist/vite.js +1 -1
- package/dist/webpack.cjs +2 -2
- package/dist/webpack.js +1 -1
- package/package.json +12 -14
|
@@ -134,6 +134,7 @@ function getDeclaration(ctx, filepath, originalImports) {
|
|
|
134
134
|
// @ts-nocheck
|
|
135
135
|
// Generated by unplugin-vue-components
|
|
136
136
|
// Read more: https://github.com/vuejs/core/pull/3399
|
|
137
|
+
// biome-ignore lint: disable
|
|
137
138
|
export {}
|
|
138
139
|
|
|
139
140
|
/* prettier-ignore */
|
|
@@ -178,7 +179,8 @@ function searchComponents(ctx) {
|
|
|
178
179
|
ignore: ctx.options.globsExclude,
|
|
179
180
|
onlyFiles: true,
|
|
180
181
|
cwd: root,
|
|
181
|
-
absolute: true
|
|
182
|
+
absolute: true,
|
|
183
|
+
expandDirectories: false
|
|
182
184
|
});
|
|
183
185
|
if (!files.length && !ctx.options.resolvers?.length)
|
|
184
186
|
console.warn("[unplugin-vue-components] no components found");
|
|
@@ -197,8 +199,8 @@ var defaultOptions = {
|
|
|
197
199
|
directoryAsNamespace: false,
|
|
198
200
|
collapseSamePrefixes: false,
|
|
199
201
|
globalNamespaces: [],
|
|
202
|
+
transformerUserResolveFunctions: true,
|
|
200
203
|
resolvers: [],
|
|
201
|
-
globsExclude: [],
|
|
202
204
|
importPathTransform: (v) => v,
|
|
203
205
|
allowOverrides: false
|
|
204
206
|
};
|
|
@@ -207,25 +209,40 @@ function normalizeResolvers(resolvers) {
|
|
|
207
209
|
}
|
|
208
210
|
function resolveGlobsExclude(root, glob) {
|
|
209
211
|
const excludeReg = /^!/;
|
|
210
|
-
return `${excludeReg.test(glob) ? "!" : ""}${resolve(root, glob.replace(excludeReg, ""))}
|
|
212
|
+
return slash(`${excludeReg.test(glob) ? "!" : ""}${resolve(root, glob.replace(excludeReg, ""))}`);
|
|
211
213
|
}
|
|
212
214
|
function resolveOptions(options, root) {
|
|
213
215
|
const resolved = Object.assign({}, defaultOptions, options);
|
|
214
216
|
resolved.resolvers = normalizeResolvers(resolved.resolvers);
|
|
215
217
|
resolved.extensions = toArray(resolved.extensions);
|
|
216
218
|
if (resolved.globs) {
|
|
217
|
-
resolved.globs = toArray(resolved.globs).map((glob) =>
|
|
219
|
+
resolved.globs = toArray(resolved.globs).map((glob) => resolveGlobsExclude(root, glob));
|
|
218
220
|
resolved.resolvedDirs = [];
|
|
219
221
|
} else {
|
|
220
222
|
const extsGlob = resolved.extensions.length === 1 ? resolved.extensions : `{${resolved.extensions.join(",")}}`;
|
|
221
223
|
resolved.dirs = toArray(resolved.dirs);
|
|
222
|
-
|
|
223
|
-
resolved.
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
const globs = resolved.dirs.map((i) => resolveGlobsExclude(root, i));
|
|
225
|
+
resolved.resolvedDirs = globs.filter((i) => !i.startsWith("!"));
|
|
226
|
+
resolved.globs = globs.map((i) => {
|
|
227
|
+
let prefix = "";
|
|
228
|
+
if (i.startsWith("!")) {
|
|
229
|
+
prefix = "!";
|
|
230
|
+
i = i.slice(1);
|
|
231
|
+
}
|
|
232
|
+
return resolved.deep ? prefix + slash(join(i, `**/*.${extsGlob}`)) : prefix + slash(join(i, `*.${extsGlob}`));
|
|
233
|
+
});
|
|
226
234
|
if (!resolved.extensions.length)
|
|
227
235
|
throw new Error("[unplugin-vue-components] `extensions` option is required to search for components");
|
|
228
236
|
}
|
|
237
|
+
if (!resolved.globsExclude)
|
|
238
|
+
resolved.globsExclude = [`**/node_modules/**`];
|
|
239
|
+
resolved.globsExclude = toArray(resolved.globsExclude || []).map((i) => resolveGlobsExclude(root, i));
|
|
240
|
+
resolved.globs = resolved.globs.filter((i) => {
|
|
241
|
+
if (!i.startsWith("!"))
|
|
242
|
+
return true;
|
|
243
|
+
resolved.globsExclude.push(i.slice(1));
|
|
244
|
+
return false;
|
|
245
|
+
});
|
|
229
246
|
resolved.dts = !resolved.dts ? false : resolve(
|
|
230
247
|
root,
|
|
231
248
|
typeof resolved.dts === "string" ? resolved.dts : "components.d.ts"
|
|
@@ -273,9 +290,12 @@ function resolveVue2(code, s) {
|
|
|
273
290
|
}
|
|
274
291
|
return results;
|
|
275
292
|
}
|
|
276
|
-
function resolveVue3(code, s) {
|
|
293
|
+
function resolveVue3(code, s, transformerUserResolveFunctions) {
|
|
277
294
|
const results = [];
|
|
278
|
-
for (const match of code.matchAll(/
|
|
295
|
+
for (const match of code.matchAll(/_?resolveComponent\d*\("(.+?)"\)/g)) {
|
|
296
|
+
if (!transformerUserResolveFunctions && !match[0].startsWith("_")) {
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
279
299
|
const matchedName = match[1];
|
|
280
300
|
if (match.index != null && matchedName && !matchedName.startsWith("_")) {
|
|
281
301
|
const start = match.index;
|
|
@@ -290,7 +310,7 @@ function resolveVue3(code, s) {
|
|
|
290
310
|
}
|
|
291
311
|
async function transformComponent(code, transformer2, s, ctx, sfcPath) {
|
|
292
312
|
let no = 0;
|
|
293
|
-
const results = transformer2 === "vue2" ? resolveVue2(code, s) : resolveVue3(code, s);
|
|
313
|
+
const results = transformer2 === "vue2" ? resolveVue2(code, s) : resolveVue3(code, s, ctx.options.transformerUserResolveFunctions);
|
|
294
314
|
for (const { rawName, replace } of results) {
|
|
295
315
|
debug2(`| ${rawName}`);
|
|
296
316
|
const name = pascalCase(rawName);
|
|
@@ -378,10 +398,13 @@ this.$options.directives["${name}"] = ${resolved};`);
|
|
|
378
398
|
}
|
|
379
399
|
|
|
380
400
|
// src/core/transforms/directive/vue3.ts
|
|
381
|
-
function resolveVue32(code, s) {
|
|
401
|
+
function resolveVue32(code, s, transformerUserResolveFunctions) {
|
|
382
402
|
const results = [];
|
|
383
|
-
for (const match of code.matchAll(/
|
|
403
|
+
for (const match of code.matchAll(/_?resolveDirective\("(.+?)"\)/g)) {
|
|
384
404
|
const matchedName = match[1];
|
|
405
|
+
if (!transformerUserResolveFunctions && !match[0].startsWith("_")) {
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
385
408
|
if (match.index != null && matchedName && !matchedName.startsWith("_")) {
|
|
386
409
|
const start = match.index;
|
|
387
410
|
const end = start + match[0].length;
|
|
@@ -134,6 +134,7 @@ function getDeclaration(ctx, filepath, originalImports) {
|
|
|
134
134
|
// @ts-nocheck
|
|
135
135
|
// Generated by unplugin-vue-components
|
|
136
136
|
// Read more: https://github.com/vuejs/core/pull/3399
|
|
137
|
+
// biome-ignore lint: disable
|
|
137
138
|
export {}
|
|
138
139
|
|
|
139
140
|
/* prettier-ignore */
|
|
@@ -178,7 +179,8 @@ function searchComponents(ctx) {
|
|
|
178
179
|
ignore: ctx.options.globsExclude,
|
|
179
180
|
onlyFiles: true,
|
|
180
181
|
cwd: root,
|
|
181
|
-
absolute: true
|
|
182
|
+
absolute: true,
|
|
183
|
+
expandDirectories: false
|
|
182
184
|
});
|
|
183
185
|
if (!files.length && !_optionalChain([ctx, 'access', _9 => _9.options, 'access', _10 => _10.resolvers, 'optionalAccess', _11 => _11.length]))
|
|
184
186
|
console.warn("[unplugin-vue-components] no components found");
|
|
@@ -197,8 +199,8 @@ var defaultOptions = {
|
|
|
197
199
|
directoryAsNamespace: false,
|
|
198
200
|
collapseSamePrefixes: false,
|
|
199
201
|
globalNamespaces: [],
|
|
202
|
+
transformerUserResolveFunctions: true,
|
|
200
203
|
resolvers: [],
|
|
201
|
-
globsExclude: [],
|
|
202
204
|
importPathTransform: (v) => v,
|
|
203
205
|
allowOverrides: false
|
|
204
206
|
};
|
|
@@ -207,25 +209,40 @@ function normalizeResolvers(resolvers) {
|
|
|
207
209
|
}
|
|
208
210
|
function resolveGlobsExclude(root, glob) {
|
|
209
211
|
const excludeReg = /^!/;
|
|
210
|
-
return `${excludeReg.test(glob) ? "!" : ""}${_path.resolve.call(void 0, root, glob.replace(excludeReg, ""))}
|
|
212
|
+
return _chunkCYD4VYHZcjs.slash.call(void 0, `${excludeReg.test(glob) ? "!" : ""}${_path.resolve.call(void 0, root, glob.replace(excludeReg, ""))}`);
|
|
211
213
|
}
|
|
212
214
|
function resolveOptions(options, root) {
|
|
213
215
|
const resolved = Object.assign({}, defaultOptions, options);
|
|
214
216
|
resolved.resolvers = normalizeResolvers(resolved.resolvers);
|
|
215
217
|
resolved.extensions = _chunkCYD4VYHZcjs.toArray.call(void 0, resolved.extensions);
|
|
216
218
|
if (resolved.globs) {
|
|
217
|
-
resolved.globs = _chunkCYD4VYHZcjs.toArray.call(void 0, resolved.globs).map((glob) =>
|
|
219
|
+
resolved.globs = _chunkCYD4VYHZcjs.toArray.call(void 0, resolved.globs).map((glob) => resolveGlobsExclude(root, glob));
|
|
218
220
|
resolved.resolvedDirs = [];
|
|
219
221
|
} else {
|
|
220
222
|
const extsGlob = resolved.extensions.length === 1 ? resolved.extensions : `{${resolved.extensions.join(",")}}`;
|
|
221
223
|
resolved.dirs = _chunkCYD4VYHZcjs.toArray.call(void 0, resolved.dirs);
|
|
222
|
-
|
|
223
|
-
resolved.
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
const globs = resolved.dirs.map((i) => resolveGlobsExclude(root, i));
|
|
225
|
+
resolved.resolvedDirs = globs.filter((i) => !i.startsWith("!"));
|
|
226
|
+
resolved.globs = globs.map((i) => {
|
|
227
|
+
let prefix = "";
|
|
228
|
+
if (i.startsWith("!")) {
|
|
229
|
+
prefix = "!";
|
|
230
|
+
i = i.slice(1);
|
|
231
|
+
}
|
|
232
|
+
return resolved.deep ? prefix + _chunkCYD4VYHZcjs.slash.call(void 0, _path.join.call(void 0, i, `**/*.${extsGlob}`)) : prefix + _chunkCYD4VYHZcjs.slash.call(void 0, _path.join.call(void 0, i, `*.${extsGlob}`));
|
|
233
|
+
});
|
|
226
234
|
if (!resolved.extensions.length)
|
|
227
235
|
throw new Error("[unplugin-vue-components] `extensions` option is required to search for components");
|
|
228
236
|
}
|
|
237
|
+
if (!resolved.globsExclude)
|
|
238
|
+
resolved.globsExclude = [`**/node_modules/**`];
|
|
239
|
+
resolved.globsExclude = _chunkCYD4VYHZcjs.toArray.call(void 0, resolved.globsExclude || []).map((i) => resolveGlobsExclude(root, i));
|
|
240
|
+
resolved.globs = resolved.globs.filter((i) => {
|
|
241
|
+
if (!i.startsWith("!"))
|
|
242
|
+
return true;
|
|
243
|
+
resolved.globsExclude.push(i.slice(1));
|
|
244
|
+
return false;
|
|
245
|
+
});
|
|
229
246
|
resolved.dts = !resolved.dts ? false : _path.resolve.call(void 0,
|
|
230
247
|
root,
|
|
231
248
|
typeof resolved.dts === "string" ? resolved.dts : "components.d.ts"
|
|
@@ -273,9 +290,12 @@ function resolveVue2(code, s) {
|
|
|
273
290
|
}
|
|
274
291
|
return results;
|
|
275
292
|
}
|
|
276
|
-
function resolveVue3(code, s) {
|
|
293
|
+
function resolveVue3(code, s, transformerUserResolveFunctions) {
|
|
277
294
|
const results = [];
|
|
278
|
-
for (const match of code.matchAll(/
|
|
295
|
+
for (const match of code.matchAll(/_?resolveComponent\d*\("(.+?)"\)/g)) {
|
|
296
|
+
if (!transformerUserResolveFunctions && !match[0].startsWith("_")) {
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
279
299
|
const matchedName = match[1];
|
|
280
300
|
if (match.index != null && matchedName && !matchedName.startsWith("_")) {
|
|
281
301
|
const start = match.index;
|
|
@@ -290,7 +310,7 @@ function resolveVue3(code, s) {
|
|
|
290
310
|
}
|
|
291
311
|
async function transformComponent(code, transformer2, s, ctx, sfcPath) {
|
|
292
312
|
let no = 0;
|
|
293
|
-
const results = transformer2 === "vue2" ? resolveVue2(code, s) : resolveVue3(code, s);
|
|
313
|
+
const results = transformer2 === "vue2" ? resolveVue2(code, s) : resolveVue3(code, s, ctx.options.transformerUserResolveFunctions);
|
|
294
314
|
for (const { rawName, replace } of results) {
|
|
295
315
|
debug2(`| ${rawName}`);
|
|
296
316
|
const name = _chunkCYD4VYHZcjs.pascalCase.call(void 0, rawName);
|
|
@@ -378,10 +398,13 @@ this.$options.directives["${name}"] = ${resolved};`);
|
|
|
378
398
|
}
|
|
379
399
|
|
|
380
400
|
// src/core/transforms/directive/vue3.ts
|
|
381
|
-
function resolveVue32(code, s) {
|
|
401
|
+
function resolveVue32(code, s, transformerUserResolveFunctions) {
|
|
382
402
|
const results = [];
|
|
383
|
-
for (const match of code.matchAll(/
|
|
403
|
+
for (const match of code.matchAll(/_?resolveDirective\("(.+?)"\)/g)) {
|
|
384
404
|
const matchedName = match[1];
|
|
405
|
+
if (!transformerUserResolveFunctions && !match[0].startsWith("_")) {
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
385
408
|
if (match.index != null && matchedName && !matchedName.startsWith("_")) {
|
|
386
409
|
const start = match.index;
|
|
387
410
|
const end = start + match[0].length;
|
package/dist/esbuild.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZ44OFZ6Mcjs = require('./chunk-Z44OFZ6M.cjs');
|
|
4
4
|
require('./chunk-CYD4VYHZ.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 = _chunkZ44OFZ6Mcjs.unplugin_default.esbuild;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.default = esbuild_default;
|
package/dist/esbuild.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZ44OFZ6Mcjs = require('./chunk-Z44OFZ6M.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -13,4 +13,4 @@ require('./chunk-ZBPRDZS4.cjs');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.camelCase = _chunkCYD4VYHZcjs.camelCase; exports.default =
|
|
16
|
+
exports.camelCase = _chunkCYD4VYHZcjs.camelCase; exports.default = _chunkZ44OFZ6Mcjs.unplugin_default; exports.kebabCase = _chunkCYD4VYHZcjs.kebabCase; exports.pascalCase = _chunkCYD4VYHZcjs.pascalCase;
|
package/dist/index.js
CHANGED
package/dist/nuxt.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZ44OFZ6Mcjs = require('./chunk-Z44OFZ6M.cjs');
|
|
4
4
|
require('./chunk-CYD4VYHZ.cjs');
|
|
5
5
|
require('./chunk-3HT76LNN.cjs');
|
|
6
6
|
require('./chunk-ZBPRDZS4.cjs');
|
|
@@ -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, _chunkZ44OFZ6Mcjs.unplugin_default.webpack(options));
|
|
13
|
+
_kit.addVitePlugin.call(void 0, _chunkZ44OFZ6Mcjs.unplugin_default.vite(options));
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
package/dist/nuxt.js
CHANGED
package/dist/resolvers.cjs
CHANGED
|
@@ -1458,6 +1458,12 @@ function TDesignResolver(options = {}) {
|
|
|
1458
1458
|
from: `tdesign-icons-${library}${importFrom}`
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
+
if (name.startsWith("TTypography") || name.startsWith("Typography")) {
|
|
1462
|
+
return {
|
|
1463
|
+
name: name.slice(name.startsWith("TTypography") ? 11 : 10),
|
|
1464
|
+
from: `tdesign-${library}${importFrom}`
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1461
1467
|
if (name.match(/^T[A-Z]/) || pluginList.includes(name)) {
|
|
1462
1468
|
const importName = name.match(/^T[A-Z]/) ? name.slice(1) : name;
|
|
1463
1469
|
return {
|
package/dist/resolvers.js
CHANGED
|
@@ -1458,6 +1458,12 @@ function TDesignResolver(options = {}) {
|
|
|
1458
1458
|
from: `tdesign-icons-${library}${importFrom}`
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
+
if (name.startsWith("TTypography") || name.startsWith("Typography")) {
|
|
1462
|
+
return {
|
|
1463
|
+
name: name.slice(name.startsWith("TTypography") ? 11 : 10),
|
|
1464
|
+
from: `tdesign-${library}${importFrom}`
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1461
1467
|
if (name.match(/^T[A-Z]/) || pluginList.includes(name)) {
|
|
1462
1468
|
const importName = name.match(/^T[A-Z]/) ? name.slice(1) : name;
|
|
1463
1469
|
return {
|
package/dist/rollup.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZ44OFZ6Mcjs = require('./chunk-Z44OFZ6M.cjs');
|
|
4
4
|
require('./chunk-CYD4VYHZ.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 = _chunkZ44OFZ6Mcjs.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
|
|
3
|
+
var _chunkZ44OFZ6Mcjs = require('./chunk-Z44OFZ6M.cjs');
|
|
4
4
|
require('./chunk-CYD4VYHZ.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 = _chunkZ44OFZ6Mcjs.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 ['<root>/**\/node_modules/**']
|
|
85
85
|
*/
|
|
86
86
|
globsExclude?: string | string[];
|
|
87
87
|
/**
|
|
@@ -125,6 +125,15 @@ interface Options {
|
|
|
125
125
|
* @default 'vue3'
|
|
126
126
|
*/
|
|
127
127
|
transformer?: SupportedTransformer;
|
|
128
|
+
/**
|
|
129
|
+
* Tranform users' usage of resolveComponent/resolveDirective as well
|
|
130
|
+
*
|
|
131
|
+
* If disabled, only components inside templates (which compiles to `_resolveComponent` etc.)
|
|
132
|
+
* will be transformed.
|
|
133
|
+
*
|
|
134
|
+
* @default true
|
|
135
|
+
*/
|
|
136
|
+
transformerUserResolveFunctions?: boolean;
|
|
128
137
|
/**
|
|
129
138
|
* Generate TypeScript declaration for global components
|
|
130
139
|
*
|
|
@@ -166,6 +175,7 @@ type ResolvedOptions = Omit<Required<Options>, 'resolvers' | 'extensions' | 'dir
|
|
|
166
175
|
dirs: string[];
|
|
167
176
|
resolvedDirs: string[];
|
|
168
177
|
globs: string[];
|
|
178
|
+
globsExclude: string[];
|
|
169
179
|
dts: string | false;
|
|
170
180
|
root: string;
|
|
171
181
|
};
|
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 ['<root>/**\/node_modules/**']
|
|
85
85
|
*/
|
|
86
86
|
globsExclude?: string | string[];
|
|
87
87
|
/**
|
|
@@ -125,6 +125,15 @@ interface Options {
|
|
|
125
125
|
* @default 'vue3'
|
|
126
126
|
*/
|
|
127
127
|
transformer?: SupportedTransformer;
|
|
128
|
+
/**
|
|
129
|
+
* Tranform users' usage of resolveComponent/resolveDirective as well
|
|
130
|
+
*
|
|
131
|
+
* If disabled, only components inside templates (which compiles to `_resolveComponent` etc.)
|
|
132
|
+
* will be transformed.
|
|
133
|
+
*
|
|
134
|
+
* @default true
|
|
135
|
+
*/
|
|
136
|
+
transformerUserResolveFunctions?: boolean;
|
|
128
137
|
/**
|
|
129
138
|
* Generate TypeScript declaration for global components
|
|
130
139
|
*
|
|
@@ -166,6 +175,7 @@ type ResolvedOptions = Omit<Required<Options>, 'resolvers' | 'extensions' | 'dir
|
|
|
166
175
|
dirs: string[];
|
|
167
176
|
resolvedDirs: string[];
|
|
168
177
|
globs: string[];
|
|
178
|
+
globsExclude: string[];
|
|
169
179
|
dts: string | false;
|
|
170
180
|
root: string;
|
|
171
181
|
};
|
package/dist/vite.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZ44OFZ6Mcjs = require('./chunk-Z44OFZ6M.cjs');
|
|
4
4
|
require('./chunk-CYD4VYHZ.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 = _chunkZ44OFZ6Mcjs.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
|
|
3
|
+
var _chunkZ44OFZ6Mcjs = require('./chunk-Z44OFZ6M.cjs');
|
|
4
4
|
require('./chunk-CYD4VYHZ.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 = _chunkZ44OFZ6Mcjs.unplugin_default.webpack;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.default = webpack_default;
|
package/dist/webpack.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-vue-components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "28.
|
|
5
|
-
"packageManager": "pnpm@10.4.0",
|
|
4
|
+
"version": "28.4.0",
|
|
6
5
|
"description": "Components auto importing for Vue",
|
|
7
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
8
7
|
"license": "MIT",
|
|
@@ -68,17 +67,6 @@
|
|
|
68
67
|
"engines": {
|
|
69
68
|
"node": ">=14"
|
|
70
69
|
},
|
|
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
|
-
},
|
|
82
70
|
"peerDependencies": {
|
|
83
71
|
"@babel/parser": "^7.15.8",
|
|
84
72
|
"@nuxt/kit": "^3.2.2",
|
|
@@ -128,5 +116,15 @@
|
|
|
128
116
|
"vitest": "^3.0.5",
|
|
129
117
|
"vue": "3.2.45",
|
|
130
118
|
"vue-tsc": "^2.2.0"
|
|
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"
|
|
131
129
|
}
|
|
132
|
-
}
|
|
130
|
+
}
|