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.
- package/README.md +4 -36
- package/dist/esbuild.d.mts +7 -0
- package/dist/esbuild.mjs +9 -0
- package/dist/{index.d.cts → index.d.mts} +4 -2
- package/dist/index.mjs +4 -0
- package/dist/nuxt.d.mts +7 -0
- package/dist/{nuxt.js → nuxt.mjs} +4 -4
- package/dist/{resolvers.d.ts → resolvers.d.mts} +189 -218
- package/dist/{resolvers.js → resolvers.mjs} +28 -83
- package/dist/rolldown.d.mts +7 -0
- package/dist/rolldown.mjs +9 -0
- package/dist/rollup.d.mts +7 -0
- package/dist/rollup.mjs +9 -0
- package/dist/rspack.d.mts +6 -0
- package/dist/rspack.mjs +9 -0
- package/dist/{src-bfjkatac.js → src-pYuu2TZ_.mjs} +53 -141
- package/dist/types-CWfK8m_y.d.mts +217 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +1 -0
- package/dist/utils-DuuqqWXg.mjs +234 -0
- package/dist/vite.d.mts +9 -0
- package/dist/vite.mjs +9 -0
- package/dist/webpack.d.mts +7 -0
- package/dist/webpack.mjs +9 -0
- package/package.json +40 -78
- package/dist/esbuild.cjs +0 -9
- package/dist/esbuild.d.cts +0 -6
- package/dist/esbuild.d.ts +0 -7
- package/dist/esbuild.js +0 -9
- package/dist/index.cjs +0 -9
- package/dist/index.d.ts +0 -13
- package/dist/index.js +0 -5
- package/dist/nuxt.cjs +0 -14
- package/dist/nuxt.d.cts +0 -6
- package/dist/nuxt.d.ts +0 -7
- package/dist/resolvers.cjs +0 -2074
- package/dist/resolvers.d.cts +0 -574
- package/dist/rolldown.cjs +0 -9
- package/dist/rolldown.d.cts +0 -6
- package/dist/rolldown.d.ts +0 -7
- package/dist/rolldown.js +0 -9
- package/dist/rollup.cjs +0 -9
- package/dist/rollup.d.cts +0 -6
- package/dist/rollup.d.ts +0 -7
- package/dist/rollup.js +0 -9
- package/dist/rspack.cjs +0 -9
- package/dist/rspack.d.cts +0 -5
- package/dist/rspack.d.ts +0 -6
- package/dist/rspack.js +0 -9
- package/dist/src-BTwFq3T3.cjs +0 -188
- package/dist/src-D2-JfLYq.js +0 -187
- package/dist/src-DAvVDVLg.cjs +0 -769
- package/dist/types-CBTc19th.cjs +0 -0
- package/dist/types-DSJ5r-ta.d.cts +0 -225
- package/dist/types-rC3290ja.d.ts +0 -225
- package/dist/types.cjs +0 -1
- package/dist/types.d.cts +0 -2
- package/dist/types.d.ts +0 -2
- package/dist/types.js +0 -3
- package/dist/utils-8UQ22cuO.cjs +0 -1689
- package/dist/utils-BoXu-4gQ.js +0 -1523
- package/dist/vite.cjs +0 -9
- package/dist/vite.d.cts +0 -8
- package/dist/vite.d.ts +0 -9
- package/dist/vite.js +0 -9
- package/dist/webpack.cjs +0 -9
- package/dist/webpack.d.cts +0 -6
- package/dist/webpack.d.ts +0 -7
- package/dist/webpack.js +0 -9
- /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
|
|
9
|
+
- 💚 Supports Vue 3 out-of-the-box.
|
|
10
10
|
- ✨ Supports both components and directives.
|
|
11
|
-
- ⚡️ Supports Vite, Webpack, Rspack,
|
|
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
|
package/dist/esbuild.mjs
ADDED
|
@@ -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 {
|
|
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,
|
|
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
package/dist/nuxt.d.mts
ADDED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./utils-
|
|
2
|
-
import { unplugin_default } from "./src-
|
|
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
|
-
|
|
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 };
|