unplugin-vue-components 0.27.0 → 0.27.1

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 CHANGED
@@ -359,6 +359,7 @@ Components({
359
359
 
360
360
  // Glob patterns to match file names to be detected as components.
361
361
  // When specified, the `dirs` and `extensions` options will be ignored.
362
+ // If you want to exclude components being registered, use negative globs with leading `!`.
362
363
  globs: ['src/components/*.{vue}'],
363
364
 
364
365
  // search for subdirectories
@@ -396,7 +397,8 @@ Components({
396
397
  // Allow for components to override other components with the same name
397
398
  allowOverrides: false,
398
399
 
399
- // filters for transforming targets
400
+ // Filters for transforming targets (components to insert the auto import)
401
+ // Note these are NOT about including/excluding components registered - use `globs` for that
400
402
  include: [/\.vue$/, /\.vue\?vue/],
401
403
  exclude: [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
402
404
 
@@ -2,7 +2,6 @@
2
2
  import { parse } from "path";
3
3
  import process from "process";
4
4
  import { minimatch } from "minimatch";
5
- import resolve from "resolve";
6
5
  import { slash, toArray } from "@antfu/utils";
7
6
  import {
8
7
  getPackageInfo,
@@ -171,11 +170,6 @@ function shouldTransform(code) {
171
170
  return false;
172
171
  return true;
173
172
  }
174
- function resolveImportPath(importName) {
175
- return resolve.sync(importName, {
176
- preserveSymlinks: false
177
- });
178
- }
179
173
 
180
174
  export {
181
175
  DISABLE_COMMENT,
@@ -192,6 +186,5 @@ export {
192
186
  getNameFromFilePath,
193
187
  resolveAlias,
194
188
  getPkgVersion,
195
- shouldTransform,
196
- resolveImportPath
189
+ shouldTransform
197
190
  };
@@ -10,7 +10,7 @@
10
10
 
11
11
 
12
12
 
13
- var _chunk5QHU6UOYcjs = require('./chunk-5QHU6UOY.cjs');
13
+ var _chunkVPUTCXXPcjs = require('./chunk-VPUTCXXP.cjs');
14
14
 
15
15
 
16
16
 
@@ -178,7 +178,7 @@ function parseDeclaration(code) {
178
178
  function stringifyComponentInfo(filepath, { from: path, as: name, name: importName }, importPathTransform) {
179
179
  if (!name)
180
180
  return void 0;
181
- path = _chunk5QHU6UOYcjs.getTransformedPath.call(void 0, path, importPathTransform);
181
+ path = _chunkVPUTCXXPcjs.getTransformedPath.call(void 0, path, importPathTransform);
182
182
  const related = _path.isAbsolute.call(void 0, path) ? `./${_path.relative.call(void 0, _path.dirname.call(void 0, filepath), path)}` : path;
183
183
  const entry = `typeof import('${_utils.slash.call(void 0, related)}')['${importName || "default"}']`;
184
184
  return [name, entry];
@@ -296,12 +296,12 @@ async function transformComponent(code, transformer2, s, ctx, sfcPath) {
296
296
  const results = transformer2 === "vue2" ? resolveVue2(code, s) : resolveVue3(code, s);
297
297
  for (const { rawName, replace } of results) {
298
298
  debug2(`| ${rawName}`);
299
- const name = _chunk5QHU6UOYcjs.pascalCase.call(void 0, rawName);
299
+ const name = _chunkVPUTCXXPcjs.pascalCase.call(void 0, rawName);
300
300
  ctx.updateUsageMap(sfcPath, [name]);
301
301
  const component = await ctx.findComponent(name, "component", [sfcPath]);
302
302
  if (component) {
303
303
  const varName = `__unplugin_components_${no}`;
304
- s.prepend(`${_chunk5QHU6UOYcjs.stringifyComponentImport.call(void 0, _chunkWJIU4Q36cjs.__spreadProps.call(void 0, _chunkWJIU4Q36cjs.__spreadValues.call(void 0, {}, component), { as: varName }), ctx)};
304
+ s.prepend(`${_chunkVPUTCXXPcjs.stringifyComponentImport.call(void 0, _chunkWJIU4Q36cjs.__spreadProps.call(void 0, _chunkWJIU4Q36cjs.__spreadValues.call(void 0, {}, component), { as: varName }), ctx)};
305
305
  `);
306
306
  no += 1;
307
307
  replace(varName);
@@ -406,13 +406,13 @@ async function transformDirective(code, transformer2, s, ctx, sfcPath) {
406
406
  const results = await (transformer2 === "vue2" ? resolveVue22(code, s) : resolveVue32(code, s));
407
407
  for (const { rawName, replace } of results) {
408
408
  debug3(`| ${rawName}`);
409
- const name = `${_chunk5QHU6UOYcjs.DIRECTIVE_IMPORT_PREFIX}${_chunk5QHU6UOYcjs.pascalCase.call(void 0, rawName)}`;
409
+ const name = `${_chunkVPUTCXXPcjs.DIRECTIVE_IMPORT_PREFIX}${_chunkVPUTCXXPcjs.pascalCase.call(void 0, rawName)}`;
410
410
  ctx.updateUsageMap(sfcPath, [name]);
411
411
  const directive = await ctx.findComponent(name, "directive", [sfcPath]);
412
412
  if (!directive)
413
413
  continue;
414
414
  const varName = `__unplugin_directives_${no}`;
415
- s.prepend(`${_chunk5QHU6UOYcjs.stringifyComponentImport.call(void 0, _chunkWJIU4Q36cjs.__spreadProps.call(void 0, _chunkWJIU4Q36cjs.__spreadValues.call(void 0, {}, directive), { as: varName }), ctx)};
415
+ s.prepend(`${_chunkVPUTCXXPcjs.stringifyComponentImport.call(void 0, _chunkWJIU4Q36cjs.__spreadProps.call(void 0, _chunkWJIU4Q36cjs.__spreadValues.call(void 0, {}, directive), { as: varName }), ctx)};
416
416
  `);
417
417
  no += 1;
418
418
  replace(varName);
@@ -431,7 +431,7 @@ function transformer(ctx, transformer2) {
431
431
  await transformComponent(code, transformer2, s, ctx, sfcPath);
432
432
  if (ctx.options.directives)
433
433
  await transformDirective(code, transformer2, s, ctx, sfcPath);
434
- s.prepend(_chunk5QHU6UOYcjs.DISABLE_COMMENT);
434
+ s.prepend(_chunkVPUTCXXPcjs.DISABLE_COMMENT);
435
435
  const result = { code: s.toString() };
436
436
  if (ctx.sourcemap)
437
437
  result.map = s.generateMap({ source: id, includeContent: true, hires: "boundary" });
@@ -476,7 +476,7 @@ var Context = class {
476
476
  this.transformer = transformer(this, name || "vue3");
477
477
  }
478
478
  transform(code, id) {
479
- const { path, query } = _chunk5QHU6UOYcjs.parseId.call(void 0, id);
479
+ const { path, query } = _chunkVPUTCXXPcjs.parseId.call(void 0, id);
480
480
  return this.transformer(code, id, path, query);
481
481
  }
482
482
  setupViteServer(server) {
@@ -488,14 +488,14 @@ var Context = class {
488
488
  setupWatcher(watcher) {
489
489
  const { globs } = this.options;
490
490
  watcher.on("unlink", (path) => {
491
- if (!_chunk5QHU6UOYcjs.matchGlobs.call(void 0, path, globs))
491
+ if (!_chunkVPUTCXXPcjs.matchGlobs.call(void 0, path, globs))
492
492
  return;
493
493
  path = _utils.slash.call(void 0, path);
494
494
  this.removeComponents(path);
495
495
  this.onUpdate(path);
496
496
  });
497
497
  watcher.on("add", (path) => {
498
- if (!_chunk5QHU6UOYcjs.matchGlobs.call(void 0, path, globs))
498
+ if (!_chunkVPUTCXXPcjs.matchGlobs.call(void 0, path, globs))
499
499
  return;
500
500
  path = _utils.slash.call(void 0, path);
501
501
  this.addComponents(path);
@@ -508,14 +508,14 @@ var Context = class {
508
508
  setupWatcherWebpack(watcher, emitUpdate) {
509
509
  const { globs } = this.options;
510
510
  watcher.on("unlink", (path) => {
511
- if (!_chunk5QHU6UOYcjs.matchGlobs.call(void 0, path, globs))
511
+ if (!_chunkVPUTCXXPcjs.matchGlobs.call(void 0, path, globs))
512
512
  return;
513
513
  path = _utils.slash.call(void 0, path);
514
514
  this.removeComponents(path);
515
515
  emitUpdate(path, "unlink");
516
516
  });
517
517
  watcher.on("add", (path) => {
518
- if (!_chunk5QHU6UOYcjs.matchGlobs.call(void 0, path, globs))
518
+ if (!_chunkVPUTCXXPcjs.matchGlobs.call(void 0, path, globs))
519
519
  return;
520
520
  path = _utils.slash.call(void 0, path);
521
521
  this.addComponents(path);
@@ -571,7 +571,7 @@ var Context = class {
571
571
  updates: []
572
572
  };
573
573
  const timestamp = +/* @__PURE__ */ new Date();
574
- const name = _chunk5QHU6UOYcjs.pascalCase.call(void 0, _chunk5QHU6UOYcjs.getNameFromFilePath.call(void 0, path, this.options));
574
+ const name = _chunkVPUTCXXPcjs.pascalCase.call(void 0, _chunkVPUTCXXPcjs.getNameFromFilePath.call(void 0, path, this.options));
575
575
  Object.entries(this._componentUsageMap).forEach(([key, values]) => {
576
576
  if (values.has(name)) {
577
577
  const r = `/${_utils.slash.call(void 0, _path.relative.call(void 0, this.root, key))}`;
@@ -589,7 +589,7 @@ var Context = class {
589
589
  updateComponentNameMap() {
590
590
  this._componentNameMap = {};
591
591
  Array.from(this._componentPaths).forEach((path) => {
592
- const name = _chunk5QHU6UOYcjs.pascalCase.call(void 0, _chunk5QHU6UOYcjs.getNameFromFilePath.call(void 0, path, this.options));
592
+ const name = _chunkVPUTCXXPcjs.pascalCase.call(void 0, _chunkVPUTCXXPcjs.getNameFromFilePath.call(void 0, path, this.options));
593
593
  if (this._componentNameMap[name] && !this.options.allowOverrides) {
594
594
  console.warn(`[unplugin-vue-components] component "${name}"(${path}) has naming conflicts with other components, ignored.`);
595
595
  return;
@@ -607,7 +607,7 @@ var Context = class {
607
607
  for (const resolver of this.options.resolvers) {
608
608
  if (resolver.type !== type)
609
609
  continue;
610
- const result = await resolver.resolve(type === "directive" ? name.slice(_chunk5QHU6UOYcjs.DIRECTIVE_IMPORT_PREFIX.length) : name);
610
+ const result = await resolver.resolve(type === "directive" ? name.slice(_chunkVPUTCXXPcjs.DIRECTIVE_IMPORT_PREFIX.length) : name);
611
611
  if (!result)
612
612
  continue;
613
613
  if (typeof result === "string") {
@@ -618,7 +618,7 @@ var Context = class {
618
618
  } else {
619
619
  info = _chunkWJIU4Q36cjs.__spreadValues.call(void 0, {
620
620
  as: name
621
- }, _chunk5QHU6UOYcjs.normalizeComponentInfo.call(void 0, result));
621
+ }, _chunkVPUTCXXPcjs.normalizeComponentInfo.call(void 0, result));
622
622
  }
623
623
  if (type === "component")
624
624
  this.addCustomComponents(info);
@@ -630,7 +630,7 @@ var Context = class {
630
630
  }
631
631
  normalizePath(path) {
632
632
  var _a, _b, _c;
633
- return _chunk5QHU6UOYcjs.resolveAlias.call(void 0, path, ((_b = (_a = this.viteConfig) == null ? void 0 : _a.resolve) == null ? void 0 : _b.alias) || ((_c = this.viteConfig) == null ? void 0 : _c.alias) || []);
633
+ return _chunkVPUTCXXPcjs.resolveAlias.call(void 0, path, ((_b = (_a = this.viteConfig) == null ? void 0 : _a.resolve) == null ? void 0 : _b.alias) || ((_c = this.viteConfig) == null ? void 0 : _c.alias) || []);
634
634
  }
635
635
  relative(path) {
636
636
  if (path.startsWith("/") && !path.startsWith(this.root))
@@ -679,7 +679,7 @@ var unplugin_default = _unplugin.createUnplugin.call(void 0, (options = {}) => {
679
679
  return await ctx.findComponent(name, "component", filename ? [filename] : []);
680
680
  },
681
681
  stringifyImport(info) {
682
- return _chunk5QHU6UOYcjs.stringifyComponentImport.call(void 0, info, ctx);
682
+ return _chunkVPUTCXXPcjs.stringifyComponentImport.call(void 0, info, ctx);
683
683
  }
684
684
  };
685
685
  return {
@@ -690,7 +690,7 @@ var unplugin_default = _unplugin.createUnplugin.call(void 0, (options = {}) => {
690
690
  return filter(id);
691
691
  },
692
692
  async transform(code, id) {
693
- if (!_chunk5QHU6UOYcjs.shouldTransform.call(void 0, code))
693
+ if (!_chunkVPUTCXXPcjs.shouldTransform.call(void 0, code))
694
694
  return null;
695
695
  try {
696
696
  const result = await ctx.transform(code, id);
@@ -2,7 +2,6 @@
2
2
  var _path = require('path');
3
3
  var _process = require('process'); var _process2 = _interopRequireDefault(_process);
4
4
  var _minimatch = require('minimatch');
5
- var _resolve = require('resolve'); var _resolve2 = _interopRequireDefault(_resolve);
6
5
  var _utils = require('@antfu/utils');
7
6
 
8
7
 
@@ -171,12 +170,6 @@ function shouldTransform(code) {
171
170
  return false;
172
171
  return true;
173
172
  }
174
- function resolveImportPath(importName) {
175
- return _resolve2.default.sync(importName, {
176
- preserveSymlinks: false
177
- });
178
- }
179
-
180
173
 
181
174
 
182
175
 
@@ -194,4 +187,4 @@ function resolveImportPath(importName) {
194
187
 
195
188
 
196
189
 
197
- exports.DISABLE_COMMENT = DISABLE_COMMENT; exports.DIRECTIVE_IMPORT_PREFIX = DIRECTIVE_IMPORT_PREFIX; exports.isSSR = isSSR; exports.pascalCase = pascalCase; exports.camelCase = camelCase; exports.kebabCase = kebabCase; exports.parseId = parseId; exports.matchGlobs = matchGlobs; exports.getTransformedPath = getTransformedPath; exports.normalizeComponentInfo = normalizeComponentInfo; exports.stringifyComponentImport = stringifyComponentImport; exports.getNameFromFilePath = getNameFromFilePath; exports.resolveAlias = resolveAlias; exports.getPkgVersion = getPkgVersion; exports.shouldTransform = shouldTransform; exports.resolveImportPath = resolveImportPath;
190
+ exports.DISABLE_COMMENT = DISABLE_COMMENT; exports.DIRECTIVE_IMPORT_PREFIX = DIRECTIVE_IMPORT_PREFIX; exports.isSSR = isSSR; exports.pascalCase = pascalCase; exports.camelCase = camelCase; exports.kebabCase = kebabCase; exports.parseId = parseId; exports.matchGlobs = matchGlobs; exports.getTransformedPath = getTransformedPath; exports.normalizeComponentInfo = normalizeComponentInfo; exports.stringifyComponentImport = stringifyComponentImport; exports.getNameFromFilePath = getNameFromFilePath; exports.resolveAlias = resolveAlias; exports.getPkgVersion = getPkgVersion; exports.shouldTransform = shouldTransform;
@@ -10,7 +10,7 @@ import {
10
10
  resolveAlias,
11
11
  shouldTransform,
12
12
  stringifyComponentImport
13
- } from "./chunk-SQHKCPM6.js";
13
+ } from "./chunk-5LSX6IQN.js";
14
14
  import {
15
15
  __spreadProps,
16
16
  __spreadValues
package/dist/esbuild.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkJGIUAMWPcjs = require('./chunk-JGIUAMWP.cjs');
4
- require('./chunk-5QHU6UOY.cjs');
3
+ var _chunkMB5VKJR2cjs = require('./chunk-MB5VKJR2.cjs');
4
+ require('./chunk-VPUTCXXP.cjs');
5
5
  require('./chunk-WJIU4Q36.cjs');
6
6
  require('./chunk-ZBPRDZS4.cjs');
7
7
 
8
8
  // src/esbuild.ts
9
- var esbuild_default = _chunkJGIUAMWPcjs.unplugin_default.esbuild;
9
+ var esbuild_default = _chunkMB5VKJR2cjs.unplugin_default.esbuild;
10
10
 
11
11
 
12
12
  exports.default = esbuild_default;
package/dist/esbuild.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-TSU3OFN5.js";
4
- import "./chunk-SQHKCPM6.js";
3
+ } from "./chunk-WH3OXX67.js";
4
+ import "./chunk-5LSX6IQN.js";
5
5
  import "./chunk-5JVO2UWC.js";
6
6
  import "./chunk-6F4PWJZI.js";
7
7
 
package/dist/index.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkJGIUAMWPcjs = require('./chunk-JGIUAMWP.cjs');
3
+ var _chunkMB5VKJR2cjs = require('./chunk-MB5VKJR2.cjs');
4
4
 
5
5
 
6
6
 
7
7
 
8
- var _chunk5QHU6UOYcjs = require('./chunk-5QHU6UOY.cjs');
8
+ var _chunkVPUTCXXPcjs = require('./chunk-VPUTCXXP.cjs');
9
9
  require('./chunk-WJIU4Q36.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 = _chunk5QHU6UOYcjs.camelCase; exports.default = _chunkJGIUAMWPcjs.unplugin_default; exports.kebabCase = _chunk5QHU6UOYcjs.kebabCase; exports.pascalCase = _chunk5QHU6UOYcjs.pascalCase;
16
+ exports.camelCase = _chunkVPUTCXXPcjs.camelCase; exports.default = _chunkMB5VKJR2cjs.unplugin_default; exports.kebabCase = _chunkVPUTCXXPcjs.kebabCase; exports.pascalCase = _chunkVPUTCXXPcjs.pascalCase;
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-TSU3OFN5.js";
3
+ } from "./chunk-WH3OXX67.js";
4
4
  import {
5
5
  camelCase,
6
6
  kebabCase,
7
7
  pascalCase
8
- } from "./chunk-SQHKCPM6.js";
8
+ } from "./chunk-5LSX6IQN.js";
9
9
  import "./chunk-5JVO2UWC.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 _chunkJGIUAMWPcjs = require('./chunk-JGIUAMWP.cjs');
4
- require('./chunk-5QHU6UOY.cjs');
3
+ var _chunkMB5VKJR2cjs = require('./chunk-MB5VKJR2.cjs');
4
+ require('./chunk-VPUTCXXP.cjs');
5
5
  require('./chunk-WJIU4Q36.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, _chunkJGIUAMWPcjs.unplugin_default.webpack(options));
13
- _kit.addVitePlugin.call(void 0, _chunkJGIUAMWPcjs.unplugin_default.vite(options));
12
+ _kit.addWebpackPlugin.call(void 0, _chunkMB5VKJR2cjs.unplugin_default.webpack(options));
13
+ _kit.addVitePlugin.call(void 0, _chunkMB5VKJR2cjs.unplugin_default.vite(options));
14
14
  }
15
15
  });
16
16
 
package/dist/nuxt.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-TSU3OFN5.js";
4
- import "./chunk-SQHKCPM6.js";
3
+ } from "./chunk-WH3OXX67.js";
4
+ import "./chunk-5LSX6IQN.js";
5
5
  import "./chunk-5JVO2UWC.js";
6
6
  import "./chunk-6F4PWJZI.js";
7
7
 
@@ -4,8 +4,7 @@
4
4
 
5
5
 
6
6
 
7
-
8
- var _chunk5QHU6UOYcjs = require('./chunk-5QHU6UOY.cjs');
7
+ var _chunkVPUTCXXPcjs = require('./chunk-VPUTCXXP.cjs');
9
8
 
10
9
 
11
10
 
@@ -222,7 +221,7 @@ function getStyleDir(compName) {
222
221
  }
223
222
  }
224
223
  if (!styleDir)
225
- styleDir = _chunk5QHU6UOYcjs.kebabCase.call(void 0, compName);
224
+ styleDir = _chunkVPUTCXXPcjs.kebabCase.call(void 0, compName);
226
225
  return styleDir;
227
226
  }
228
227
  function getSideEffects(compName, options) {
@@ -402,7 +401,7 @@ function resolveComponent(name, options) {
402
401
  from: "@element-plus/icons-vue"
403
402
  };
404
403
  }
405
- const partialName = _chunk5QHU6UOYcjs.kebabCase.call(void 0, name.slice(2));
404
+ const partialName = _chunkVPUTCXXPcjs.kebabCase.call(void 0, name.slice(2));
406
405
  const { version, ssr, nightly } = options;
407
406
  if (compare(version, "1.1.0-beta.1", ">=") || nightly) {
408
407
  return {
@@ -450,7 +449,7 @@ function ElementPlusResolver(options = {}) {
450
449
  return optionsResolved;
451
450
  optionsResolved = _chunkWJIU4Q36cjs.__spreadValues.call(void 0, {
452
451
  ssr: false,
453
- version: await _chunk5QHU6UOYcjs.getPkgVersion.call(void 0, "element-plus", "2.2.2"),
452
+ version: await _chunkVPUTCXXPcjs.getPkgVersion.call(void 0, "element-plus", "2.2.2"),
454
453
  importStyle: "css",
455
454
  directives: true,
456
455
  exclude: void 0,
@@ -504,7 +503,7 @@ function ElementUiResolver(options = {}) {
504
503
  return;
505
504
  if (/^El[A-Z]/.test(name)) {
506
505
  const compName = name.slice(2);
507
- const partialName = _chunk5QHU6UOYcjs.kebabCase.call(void 0, compName);
506
+ const partialName = _chunkVPUTCXXPcjs.kebabCase.call(void 0, compName);
508
507
  if (partialName === "collapse-transition") {
509
508
  return {
510
509
  from: `element-ui/lib/transitions/${partialName}`
@@ -619,11 +618,11 @@ function IduxResolver(options = {}) {
619
618
  const packageName = getPackageName(name);
620
619
  if (!packageName)
621
620
  return;
622
- const resolvedVersion = await _chunk5QHU6UOYcjs.getPkgVersion.call(void 0, `${scope}/${packageName}`, "2.0.0");
621
+ const resolvedVersion = await _chunkVPUTCXXPcjs.getPkgVersion.call(void 0, `${scope}/${packageName}`, "2.0.0");
623
622
  let dirname = specialComponents[name];
624
623
  if (!dirname) {
625
624
  const nameIndex = packageName === "pro" ? 2 : 1;
626
- dirname = _chunk5QHU6UOYcjs.kebabCase.call(void 0, name).split("-")[nameIndex];
625
+ dirname = _chunkVPUTCXXPcjs.kebabCase.call(void 0, name).split("-")[nameIndex];
627
626
  }
628
627
  const path = `${scope}/${packageName}/${dirname}`;
629
628
  const sideEffects = packageName === "cdk" ? void 0 : getSideEffects4(resolvedVersion, path, importStyle, importStyleTheme);
@@ -828,10 +827,10 @@ function PrimeVueResolver(options = {}) {
828
827
  }
829
828
 
830
829
  // src/core/resolvers/vant.ts
831
- var moduleType = _chunk5QHU6UOYcjs.isSSR ? "lib" : "es";
830
+ var moduleType = _chunkVPUTCXXPcjs.isSSR ? "lib" : "es";
832
831
  function getSideEffects5(dirName, options) {
833
832
  const { importStyle = true } = options;
834
- if (!importStyle || _chunk5QHU6UOYcjs.isSSR)
833
+ if (!importStyle || _chunkVPUTCXXPcjs.isSSR)
835
834
  return;
836
835
  if (importStyle === "less")
837
836
  return `vant/${moduleType}/${dirName}/style/less`;
@@ -848,7 +847,7 @@ function VantResolver(options = {}) {
848
847
  return {
849
848
  name: partialName,
850
849
  from: `vant/${moduleType}`,
851
- sideEffects: getSideEffects5(_chunk5QHU6UOYcjs.kebabCase.call(void 0, partialName), options)
850
+ sideEffects: getSideEffects5(_chunkVPUTCXXPcjs.kebabCase.call(void 0, partialName), options)
852
851
  };
853
852
  }
854
853
  }
@@ -871,9 +870,9 @@ function getResolved(name, options) {
871
870
  const sideEffects = [];
872
871
  if (importStyle || importCss) {
873
872
  if (importStyle === "less" || importLess)
874
- sideEffects.push(`${path}/es/${_chunk5QHU6UOYcjs.kebabCase.call(void 0, name)}/style/less`);
873
+ sideEffects.push(`${path}/es/${_chunkVPUTCXXPcjs.kebabCase.call(void 0, name)}/style/less`);
875
874
  else
876
- sideEffects.push(`${path}/es/${_chunk5QHU6UOYcjs.kebabCase.call(void 0, name)}/style/index${styleExtname}`);
875
+ sideEffects.push(`${path}/es/${_chunkVPUTCXXPcjs.kebabCase.call(void 0, name)}/style/index${styleExtname}`);
877
876
  }
878
877
  return {
879
878
  from: path,
@@ -909,6 +908,7 @@ function VarletUIResolver(options = {}) {
909
908
 
910
909
  // src/core/resolvers/veui.ts
911
910
  var _path = require('path');
911
+ var _mlly = require('mlly');
912
912
  var VEUI_PACKAGE_NAME = "veui";
913
913
  var components3;
914
914
  function VeuiResolver(options = {}) {
@@ -935,15 +935,15 @@ function VeuiResolver(options = {}) {
935
935
  };
936
936
  }
937
937
  var formatters = {
938
- "kebab-case": _chunk5QHU6UOYcjs.kebabCase,
939
- "camelCase": _chunk5QHU6UOYcjs.camelCase,
940
- "PascalCase": _chunk5QHU6UOYcjs.pascalCase
938
+ "kebab-case": _chunkVPUTCXXPcjs.kebabCase,
939
+ "camelCase": _chunkVPUTCXXPcjs.camelCase,
940
+ "PascalCase": _chunkVPUTCXXPcjs.pascalCase
941
941
  };
942
942
  var peerPaths = /* @__PURE__ */ new Map();
943
943
  function assertPeerPath(peerPath) {
944
944
  if (!peerPaths.has(peerPath)) {
945
945
  try {
946
- _chunk5QHU6UOYcjs.resolveImportPath.call(void 0, peerPath);
946
+ _mlly.resolvePathSync.call(void 0, peerPath);
947
947
  peerPaths.set(peerPath, true);
948
948
  } catch (e) {
949
949
  peerPaths.set(peerPath, false);
@@ -997,12 +997,12 @@ function getCompDir(compName) {
997
997
  for (let i = 0; i < total; i++) {
998
998
  const matcher = matchComponents2[i];
999
999
  if (compName.match(matcher.pattern)) {
1000
- compPath = `${matcher.compDir}/${_chunk5QHU6UOYcjs.kebabCase.call(void 0, compName)}.vue`;
1000
+ compPath = `${matcher.compDir}/${_chunkVPUTCXXPcjs.kebabCase.call(void 0, compName)}.vue`;
1001
1001
  break;
1002
1002
  }
1003
1003
  }
1004
1004
  if (!compPath)
1005
- compPath = _chunk5QHU6UOYcjs.kebabCase.call(void 0, compName);
1005
+ compPath = _chunkVPUTCXXPcjs.kebabCase.call(void 0, compName);
1006
1006
  return compPath;
1007
1007
  }
1008
1008
  function ViewUiResolver() {
@@ -1153,7 +1153,7 @@ function getSideEffects8(name, filename) {
1153
1153
  function componentsResolver(name, { ssr }) {
1154
1154
  if (!name.match(/^D[A-Z]/))
1155
1155
  return;
1156
- const resolveId = _chunk5QHU6UOYcjs.kebabCase.call(void 0, name = name.slice(1));
1156
+ const resolveId = _chunkVPUTCXXPcjs.kebabCase.call(void 0, name = name.slice(1));
1157
1157
  return {
1158
1158
  name,
1159
1159
  sideEffects: getSideEffects8(resolveId, "style.css"),
@@ -1161,7 +1161,7 @@ function componentsResolver(name, { ssr }) {
1161
1161
  };
1162
1162
  }
1163
1163
  function directivesResolver(name, { ssr }) {
1164
- const resolveId = _chunk5QHU6UOYcjs.kebabCase.call(void 0, name);
1164
+ const resolveId = _chunkVPUTCXXPcjs.kebabCase.call(void 0, name);
1165
1165
  return {
1166
1166
  name: `${name}Directive`,
1167
1167
  sideEffects: getSideEffects8(resolveId, "style.css"),
@@ -1328,7 +1328,7 @@ var matchComponents3 = [
1328
1328
  function getComponentStyleDir(importName, importStyle) {
1329
1329
  if (["ConfigProvider", "Icon"].includes(importName))
1330
1330
  return void 0;
1331
- let componentDir = _chunk5QHU6UOYcjs.kebabCase.call(void 0, importName);
1331
+ let componentDir = _chunkVPUTCXXPcjs.kebabCase.call(void 0, importName);
1332
1332
  for (const item of matchComponents3) {
1333
1333
  if (item.pattern.test(importName)) {
1334
1334
  componentDir = item.componentDir;
@@ -1366,7 +1366,7 @@ function ArcoResolver(options = {}) {
1366
1366
  resolve: (name) => {
1367
1367
  var _a;
1368
1368
  if (canResolveIcons(options.resolveIcons)) {
1369
- const iconPrefix = _chunk5QHU6UOYcjs.pascalCase.call(void 0, getResolveIconPrefix(options.resolveIcons));
1369
+ const iconPrefix = _chunkVPUTCXXPcjs.pascalCase.call(void 0, getResolveIconPrefix(options.resolveIcons));
1370
1370
  const newNameRegexp = new RegExp(`^${iconPrefix}Icon`);
1371
1371
  if (newNameRegexp.test(name)) {
1372
1372
  debug("found icon component name %s", name);
@@ -526,6 +526,8 @@ declare function BootstrapVueResolver(_options?: BootstrapVueResolverOptions): C
526
526
  * Resolver for BootstrapVueNext
527
527
  *
528
528
  * @link https://github.com/bootstrap-vue/bootstrap-vue-next
529
+ *
530
+ * @deprecated use `import { BootstrapVueNextResolver } from 'bootstrap-vue-next'` instead
529
531
  */
530
532
  declare function BootstrapVueNextResolver(_options?: BootstrapVueResolverOptions): Array<ComponentResolver>;
531
533
  /**
@@ -526,6 +526,8 @@ declare function BootstrapVueResolver(_options?: BootstrapVueResolverOptions): C
526
526
  * Resolver for BootstrapVueNext
527
527
  *
528
528
  * @link https://github.com/bootstrap-vue/bootstrap-vue-next
529
+ *
530
+ * @deprecated use `import { BootstrapVueNextResolver } from 'bootstrap-vue-next'` instead
529
531
  */
530
532
  declare function BootstrapVueNextResolver(_options?: BootstrapVueResolverOptions): Array<ComponentResolver>;
531
533
  /**
package/dist/resolvers.js CHANGED
@@ -3,9 +3,8 @@ import {
3
3
  getPkgVersion,
4
4
  isSSR,
5
5
  kebabCase,
6
- pascalCase,
7
- resolveImportPath
8
- } from "./chunk-SQHKCPM6.js";
6
+ pascalCase
7
+ } from "./chunk-5LSX6IQN.js";
9
8
  import {
10
9
  __require,
11
10
  __spreadProps,
@@ -909,6 +908,7 @@ function VarletUIResolver(options = {}) {
909
908
 
910
909
  // src/core/resolvers/veui.ts
911
910
  import { join, normalize } from "path";
911
+ import { resolvePathSync } from "mlly";
912
912
  var VEUI_PACKAGE_NAME = "veui";
913
913
  var components3;
914
914
  function VeuiResolver(options = {}) {
@@ -943,7 +943,7 @@ var peerPaths = /* @__PURE__ */ new Map();
943
943
  function assertPeerPath(peerPath) {
944
944
  if (!peerPaths.has(peerPath)) {
945
945
  try {
946
- resolveImportPath(peerPath);
946
+ resolvePathSync(peerPath);
947
947
  peerPaths.set(peerPath, true);
948
948
  } catch (e) {
949
949
  peerPaths.set(peerPath, false);
package/dist/rollup.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkJGIUAMWPcjs = require('./chunk-JGIUAMWP.cjs');
4
- require('./chunk-5QHU6UOY.cjs');
3
+ var _chunkMB5VKJR2cjs = require('./chunk-MB5VKJR2.cjs');
4
+ require('./chunk-VPUTCXXP.cjs');
5
5
  require('./chunk-WJIU4Q36.cjs');
6
6
  require('./chunk-ZBPRDZS4.cjs');
7
7
 
8
8
  // src/rollup.ts
9
- var rollup_default = _chunkJGIUAMWPcjs.unplugin_default.rollup;
9
+ var rollup_default = _chunkMB5VKJR2cjs.unplugin_default.rollup;
10
10
 
11
11
 
12
12
  exports.default = rollup_default;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-TSU3OFN5.js";
4
- import "./chunk-SQHKCPM6.js";
3
+ } from "./chunk-WH3OXX67.js";
4
+ import "./chunk-5LSX6IQN.js";
5
5
  import "./chunk-5JVO2UWC.js";
6
6
  import "./chunk-6F4PWJZI.js";
7
7
 
package/dist/rspack.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkJGIUAMWPcjs = require('./chunk-JGIUAMWP.cjs');
4
- require('./chunk-5QHU6UOY.cjs');
3
+ var _chunkMB5VKJR2cjs = require('./chunk-MB5VKJR2.cjs');
4
+ require('./chunk-VPUTCXXP.cjs');
5
5
  require('./chunk-WJIU4Q36.cjs');
6
6
  require('./chunk-ZBPRDZS4.cjs');
7
7
 
8
8
  // src/rspack.ts
9
- var rspack_default = _chunkJGIUAMWPcjs.unplugin_default.rspack;
9
+ var rspack_default = _chunkMB5VKJR2cjs.unplugin_default.rspack;
10
10
 
11
11
 
12
12
  exports.default = rspack_default;
package/dist/rspack.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-TSU3OFN5.js";
4
- import "./chunk-SQHKCPM6.js";
3
+ } from "./chunk-WH3OXX67.js";
4
+ import "./chunk-5LSX6IQN.js";
5
5
  import "./chunk-5JVO2UWC.js";
6
6
  import "./chunk-6F4PWJZI.js";
7
7
 
package/dist/vite.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkJGIUAMWPcjs = require('./chunk-JGIUAMWP.cjs');
4
- require('./chunk-5QHU6UOY.cjs');
3
+ var _chunkMB5VKJR2cjs = require('./chunk-MB5VKJR2.cjs');
4
+ require('./chunk-VPUTCXXP.cjs');
5
5
  require('./chunk-WJIU4Q36.cjs');
6
6
  require('./chunk-ZBPRDZS4.cjs');
7
7
 
8
8
  // src/vite.ts
9
- var vite_default = _chunkJGIUAMWPcjs.unplugin_default.vite;
9
+ var vite_default = _chunkMB5VKJR2cjs.unplugin_default.vite;
10
10
 
11
11
 
12
12
  exports.default = vite_default;
package/dist/vite.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-TSU3OFN5.js";
4
- import "./chunk-SQHKCPM6.js";
3
+ } from "./chunk-WH3OXX67.js";
4
+ import "./chunk-5LSX6IQN.js";
5
5
  import "./chunk-5JVO2UWC.js";
6
6
  import "./chunk-6F4PWJZI.js";
7
7
 
package/dist/webpack.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkJGIUAMWPcjs = require('./chunk-JGIUAMWP.cjs');
4
- require('./chunk-5QHU6UOY.cjs');
3
+ var _chunkMB5VKJR2cjs = require('./chunk-MB5VKJR2.cjs');
4
+ require('./chunk-VPUTCXXP.cjs');
5
5
  require('./chunk-WJIU4Q36.cjs');
6
6
  require('./chunk-ZBPRDZS4.cjs');
7
7
 
8
8
  // src/webpack.ts
9
- var webpack_default = _chunkJGIUAMWPcjs.unplugin_default.webpack;
9
+ var webpack_default = _chunkMB5VKJR2cjs.unplugin_default.webpack;
10
10
 
11
11
 
12
12
  exports.default = webpack_default;
package/dist/webpack.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-TSU3OFN5.js";
4
- import "./chunk-SQHKCPM6.js";
3
+ } from "./chunk-WH3OXX67.js";
4
+ import "./chunk-5LSX6IQN.js";
5
5
  import "./chunk-5JVO2UWC.js";
6
6
  import "./chunk-6F4PWJZI.js";
7
7
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unplugin-vue-components",
3
3
  "type": "module",
4
- "version": "0.27.0",
4
+ "version": "0.27.1",
5
5
  "packageManager": "pnpm@9.0.6",
6
6
  "description": "Components auto importing for Vue",
7
7
  "author": "antfu <anthonyfu117@hotmail.com>",
@@ -101,7 +101,7 @@
101
101
  "local-pkg": "^0.5.0",
102
102
  "magic-string": "^0.30.10",
103
103
  "minimatch": "^9.0.4",
104
- "resolve": "^1.22.8",
104
+ "mlly": "^1.7.1",
105
105
  "unplugin": "^1.10.1"
106
106
  },
107
107
  "devDependencies": {
@@ -112,7 +112,6 @@
112
112
  "@types/debug": "^4.1.12",
113
113
  "@types/minimatch": "^5.1.2",
114
114
  "@types/node": "^20.12.7",
115
- "@types/resolve": "^1.20.6",
116
115
  "bumpp": "^9.4.1",
117
116
  "compare-versions": "^6.1.0",
118
117
  "element-plus": "^2.7.2",