unplugin-vue-components 29.2.0 → 31.0.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.
Files changed (70) hide show
  1. package/README.md +4 -36
  2. package/dist/esbuild.d.mts +7 -0
  3. package/dist/esbuild.mjs +9 -0
  4. package/dist/{index.d.cts → index.d.mts} +4 -2
  5. package/dist/index.mjs +4 -0
  6. package/dist/nuxt.d.mts +7 -0
  7. package/dist/{nuxt.js → nuxt.mjs} +4 -4
  8. package/dist/{resolvers.d.ts → resolvers.d.mts} +189 -218
  9. package/dist/{resolvers.js → resolvers.mjs} +28 -83
  10. package/dist/rolldown.d.mts +7 -0
  11. package/dist/rolldown.mjs +9 -0
  12. package/dist/rollup.d.mts +7 -0
  13. package/dist/rollup.mjs +9 -0
  14. package/dist/rspack.d.mts +6 -0
  15. package/dist/rspack.mjs +9 -0
  16. package/dist/{src-bfjkatac.js → src-pYuu2TZ_.mjs} +53 -141
  17. package/dist/types-CWfK8m_y.d.mts +217 -0
  18. package/dist/types.d.mts +2 -0
  19. package/dist/types.mjs +1 -0
  20. package/dist/utils-DuuqqWXg.mjs +234 -0
  21. package/dist/vite.d.mts +9 -0
  22. package/dist/vite.mjs +9 -0
  23. package/dist/webpack.d.mts +7 -0
  24. package/dist/webpack.mjs +9 -0
  25. package/package.json +40 -78
  26. package/dist/esbuild.cjs +0 -9
  27. package/dist/esbuild.d.cts +0 -6
  28. package/dist/esbuild.d.ts +0 -7
  29. package/dist/esbuild.js +0 -9
  30. package/dist/index.cjs +0 -9
  31. package/dist/index.d.ts +0 -13
  32. package/dist/index.js +0 -5
  33. package/dist/nuxt.cjs +0 -14
  34. package/dist/nuxt.d.cts +0 -6
  35. package/dist/nuxt.d.ts +0 -7
  36. package/dist/resolvers.cjs +0 -2074
  37. package/dist/resolvers.d.cts +0 -574
  38. package/dist/rolldown.cjs +0 -9
  39. package/dist/rolldown.d.cts +0 -6
  40. package/dist/rolldown.d.ts +0 -7
  41. package/dist/rolldown.js +0 -9
  42. package/dist/rollup.cjs +0 -9
  43. package/dist/rollup.d.cts +0 -6
  44. package/dist/rollup.d.ts +0 -7
  45. package/dist/rollup.js +0 -9
  46. package/dist/rspack.cjs +0 -9
  47. package/dist/rspack.d.cts +0 -5
  48. package/dist/rspack.d.ts +0 -6
  49. package/dist/rspack.js +0 -9
  50. package/dist/src-BTwFq3T3.cjs +0 -188
  51. package/dist/src-D2-JfLYq.js +0 -187
  52. package/dist/src-DAvVDVLg.cjs +0 -769
  53. package/dist/types-CBTc19th.cjs +0 -0
  54. package/dist/types-DSJ5r-ta.d.cts +0 -225
  55. package/dist/types-rC3290ja.d.ts +0 -225
  56. package/dist/types.cjs +0 -1
  57. package/dist/types.d.cts +0 -2
  58. package/dist/types.d.ts +0 -2
  59. package/dist/types.js +0 -3
  60. package/dist/utils-8UQ22cuO.cjs +0 -1689
  61. package/dist/utils-BoXu-4gQ.js +0 -1523
  62. package/dist/vite.cjs +0 -9
  63. package/dist/vite.d.cts +0 -8
  64. package/dist/vite.d.ts +0 -9
  65. package/dist/vite.js +0 -9
  66. package/dist/webpack.cjs +0 -9
  67. package/dist/webpack.d.cts +0 -6
  68. package/dist/webpack.d.ts +0 -7
  69. package/dist/webpack.js +0 -9
  70. /package/dist/{types-DQoXDiso.js → types--fVOUYBq.mjs} +0 -0
package/README.md CHANGED
@@ -6,9 +6,9 @@ On-demand components auto importing for Vue.
6
6
 
7
7
  ###### Features
8
8
 
9
- - 💚 Supports both Vue 2 and Vue 3 out-of-the-box.
9
+ - 💚 Supports Vue 3 out-of-the-box.
10
10
  - ✨ Supports both components and directives.
11
- - ⚡️ Supports Vite, Webpack, Rspack, Vue CLI, Rollup, esbuild and more, powered by <a href="https://github.com/unjs/unplugin">unplugin</a>.
11
+ - ⚡️ Supports Vite, Webpack, Rspack, Rollup, Rolldown, esbuild and more, powered by <a href="https://github.com/unjs/unplugin">unplugin</a>.
12
12
  - 🏝 Tree-shakable, only registers the components you use.
13
13
  - 🪐 Folder names as namespaces.
14
14
  - 🦾 Full TypeScript support.
@@ -86,6 +86,7 @@ export default {
86
86
 
87
87
  ```ts
88
88
  // webpack.config.js
89
+ // unplugin-vue-components removed support for CommonJS after version 29.1.0
89
90
  module.exports = {
90
91
  /* ... */
91
92
  plugins: [
@@ -101,6 +102,7 @@ module.exports = {
101
102
 
102
103
  ```ts
103
104
  // rspack.config.js
105
+ // unplugin-vue-components removed support for CommonJS after version 29.1.0
104
106
  module.exports = {
105
107
  /* ... */
106
108
  plugins: [
@@ -118,36 +120,6 @@ You might not need this plugin for Nuxt. Use [`@nuxt/components`](https://github
118
120
 
119
121
  <br></details>
120
122
 
121
- <details>
122
- <summary>Vue CLI</summary><br>
123
-
124
- ```ts
125
- // vue.config.js
126
- module.exports = {
127
- /* ... */
128
- plugins: [
129
- require('unplugin-vue-components/webpack')({ /* options */ }),
130
- ],
131
- }
132
- ```
133
-
134
- You can also rename the Vue configuration file to `vue.config.mjs` and use static import syntax (you should use latest `@vue/cli-service ^5.0.8`):
135
-
136
- ```ts
137
- // vue.config.mjs
138
- import Components from 'unplugin-vue-components/webpack'
139
-
140
- export default {
141
- configureWebpack: {
142
- plugins: [
143
- Components({ /* options */ }),
144
- ],
145
- },
146
- }
147
- ```
148
-
149
- <br></details>
150
-
151
123
  <details>
152
124
  <summary>Quasar</summary><br>
153
125
 
@@ -266,7 +238,6 @@ Supported Resolvers:
266
238
  - [Arco Design Vue](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/arco.ts)
267
239
  - [BootstrapVue](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/bootstrap-vue.ts)
268
240
  - [Element Plus](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/element-plus.ts)
269
- - [Element UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/element-ui.ts)
270
241
  - [Headless UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/headless-ui.ts)
271
242
  - [IDux](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/idux.ts)
272
243
  - [Inkline](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/inkline.ts)
@@ -440,9 +411,6 @@ Components({
440
411
  globalNamespaces: [],
441
412
 
442
413
  // auto import for directives
443
- // default: `true` for Vue 3, `false` for Vue 2
444
- // Babel is needed to do the transformation for Vue 2, it's disabled by default for performance concerns.
445
- // To install Babel, run: `npm install -D @babel/parser`
446
414
  directives: true,
447
415
 
448
416
  // Transform path before resolving
@@ -0,0 +1,7 @@
1
+ import { u as Options } from "./types-CWfK8m_y.mjs";
2
+ import * as esbuild0 from "esbuild";
3
+
4
+ //#region src/esbuild.d.ts
5
+ declare const esbuild: (options: Options) => esbuild0.Plugin;
6
+ //#endregion
7
+ export { esbuild as default, esbuild as "module.exports" };
@@ -0,0 +1,9 @@
1
+ import "./utils-DuuqqWXg.mjs";
2
+ import { t as unplugin_default } from "./src-pYuu2TZ_.mjs";
3
+
4
+ //#region src/esbuild.ts
5
+ const esbuild = unplugin_default.esbuild;
6
+ var esbuild_default = esbuild;
7
+
8
+ //#endregion
9
+ export { esbuild_default as default, esbuild as "module.exports" };
@@ -1,6 +1,8 @@
1
- import { ComponentInfo, ComponentResolveResult, ComponentResolver, ComponentResolverFunction, ComponentResolverObject, ComponentsImportMap, ImportInfo, ImportInfoLegacy, Matcher, Options, PublicPluginAPI, ResolvedOptions, SideEffectsInfo, SupportedTransformer, Transformer, TypeImport } from "./types-DSJ5r-ta.cjs";
1
+ import { a as ComponentResolverObject, c as ImportInfoLegacy, d as PublicPluginAPI, f as ResolvedOptions, h as TypeImport, i as ComponentResolverFunction, l as Matcher, m as Transformer, n as ComponentResolveResult, o as ComponentsImportMap, p as SideEffectsInfo, r as ComponentResolver, s as ImportInfo, t as ComponentInfo, u as Options } from "./types-CWfK8m_y.mjs";
2
+ import "chokidar";
2
3
  import * as unplugin0 from "unplugin";
3
4
  import { FilterPattern } from "unplugin-utils";
5
+ import "vite";
4
6
 
5
7
  //#region src/core/unplugin.d.ts
6
8
  declare const _default: unplugin0.UnpluginInstance<Options, boolean>;
@@ -10,4 +12,4 @@ declare function pascalCase(str: string): string;
10
12
  declare function camelCase(str: string): string;
11
13
  declare function kebabCase(key: string): string;
12
14
  //#endregion
13
- export { ComponentInfo, ComponentResolveResult, ComponentResolver, ComponentResolverFunction, ComponentResolverObject, ComponentsImportMap, ImportInfo, ImportInfoLegacy, Matcher, Options, PublicPluginAPI, ResolvedOptions, SideEffectsInfo, SupportedTransformer, Transformer, TypeImport, camelCase, _default as default, kebabCase, pascalCase };
15
+ export { ComponentInfo, ComponentResolveResult, ComponentResolver, ComponentResolverFunction, ComponentResolverObject, ComponentsImportMap, ImportInfo, ImportInfoLegacy, Matcher, Options, PublicPluginAPI, ResolvedOptions, SideEffectsInfo, Transformer, TypeImport, camelCase, _default as default, kebabCase, pascalCase };
package/dist/index.mjs ADDED
@@ -0,0 +1,4 @@
1
+ import { c as kebabCase, f as pascalCase, t as camelCase } from "./utils-DuuqqWXg.mjs";
2
+ import { t as unplugin_default } from "./src-pYuu2TZ_.mjs";
3
+
4
+ export { camelCase, unplugin_default as default, kebabCase, pascalCase };
@@ -0,0 +1,7 @@
1
+ import { u as Options } from "./types-CWfK8m_y.mjs";
2
+ import { NuxtModule } from "@nuxt/schema";
3
+
4
+ //#region src/nuxt.d.ts
5
+ declare const module: NuxtModule<Options, Options, false>;
6
+ //#endregion
7
+ export { module as default };
@@ -1,13 +1,13 @@
1
- import "./utils-BoXu-4gQ.js";
2
- import { unplugin_default } from "./src-bfjkatac.js";
3
- import "./types-DQoXDiso.js";
1
+ import "./utils-DuuqqWXg.mjs";
2
+ import { t as unplugin_default } from "./src-pYuu2TZ_.mjs";
4
3
  import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
5
4
 
6
5
  //#region src/nuxt.ts
7
- var nuxt_default = defineNuxtModule({ setup(options) {
6
+ const module = defineNuxtModule({ setup(options) {
8
7
  addWebpackPlugin(unplugin_default.webpack(options));
9
8
  addVitePlugin(unplugin_default.vite(options));
10
9
  } });
10
+ var nuxt_default = module;
11
11
 
12
12
  //#endregion
13
13
  export { nuxt_default as default };