unplugin-vue-components 0.17.9 → 0.17.14
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 +23 -1
- package/dist/{chunk-VGL64D3T.js → chunk-42OWKG5W.js} +1 -1
- package/dist/{chunk-BPS23YOY.mjs → chunk-KCFA67G3.mjs} +6 -6
- package/dist/{chunk-CB6M22NE.js → chunk-PBOKHWI5.js} +17 -17
- package/dist/{chunk-IDYWJDFZ.mjs → chunk-V5TNASXD.mjs} +3 -3
- package/dist/esbuild.d.ts +9 -0
- package/dist/esbuild.js +13 -0
- package/dist/esbuild.mjs +12 -0
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/nuxt.js +4 -4
- package/dist/nuxt.mjs +2 -2
- package/dist/resolvers.d.ts +68 -2
- package/dist/resolvers.js +275 -36
- package/dist/resolvers.mjs +259 -20
- package/dist/rollup.js +3 -3
- package/dist/rollup.mjs +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/vite.js +3 -3
- package/dist/vite.mjs +2 -2
- package/dist/webpack.js +3 -3
- package/dist/webpack.mjs +2 -2
- package/esbuild.d.ts +2 -0
- package/package.json +28 -23
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ On-demand components auto importing for Vue.
|
|
|
8
8
|
|
|
9
9
|
- 💚 Supports both Vue 2 and Vue 3 out-of-the-box.
|
|
10
10
|
- ✨ Supports both components and directives.
|
|
11
|
-
- ⚡️ Supports Vite, Webpack, Vue CLI, Rollup and more, powered by <a href="https://github.com/unjs/unplugin">unplugin</a>.
|
|
11
|
+
- ⚡️ Supports Vite, Webpack, Vue CLI, Rollup, 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.
|
|
@@ -104,6 +104,25 @@ module.exports = {
|
|
|
104
104
|
|
|
105
105
|
<br></details>
|
|
106
106
|
|
|
107
|
+
<details>
|
|
108
|
+
<summary>esbuild</summary><br>
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
// esbuild.config.js
|
|
112
|
+
import { build } from 'esbuild'
|
|
113
|
+
|
|
114
|
+
build({
|
|
115
|
+
/* ... */
|
|
116
|
+
plugins: [
|
|
117
|
+
require('unplugin-vue-components/esbuild')({
|
|
118
|
+
/* options */
|
|
119
|
+
}),
|
|
120
|
+
],
|
|
121
|
+
})
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
<br></details>
|
|
125
|
+
|
|
107
126
|
## Usage
|
|
108
127
|
|
|
109
128
|
Use components in templates as you would usually do, it will import components on demand, and there is no `import` and `component registration` required anymore! If you register the parent component asynchronously (or lazy route), the auto-imported components will be code-split along with their parent.
|
|
@@ -166,10 +185,12 @@ We have several built-in resolvers for popular UI libraries like **Vuetify**, **
|
|
|
166
185
|
Supported Resolvers:
|
|
167
186
|
|
|
168
187
|
- [Ant Design Vue](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/antdv.ts)
|
|
188
|
+
- [Arco Design Vue](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/arco.ts)
|
|
169
189
|
- [Element Plus](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/element-plus.ts)
|
|
170
190
|
- [Element UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/element-ui.ts)
|
|
171
191
|
- [Headless UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/headless-ui.ts)
|
|
172
192
|
- [IDux](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/idux.ts)
|
|
193
|
+
- [Inkline](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/inkline.ts)
|
|
173
194
|
- [Naive UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/naive-ui.ts)
|
|
174
195
|
- [Prime Vue](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/prime-vue.ts)
|
|
175
196
|
- [Vant](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/vant.ts)
|
|
@@ -179,6 +200,7 @@ Supported Resolvers:
|
|
|
179
200
|
- [Vuetify](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/vuetify.ts)
|
|
180
201
|
- [VueUse Components](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/vueuse.ts)
|
|
181
202
|
- [Quasar](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/quasar.ts)
|
|
203
|
+
- [TDesign](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/tdesign.ts)
|
|
182
204
|
|
|
183
205
|
```ts
|
|
184
206
|
// vite.config.js
|
|
@@ -105,7 +105,7 @@ function getNameFromFilePath(filePath, options) {
|
|
|
105
105
|
}
|
|
106
106
|
return filename;
|
|
107
107
|
}
|
|
108
|
-
function resolveAlias(filepath, alias
|
|
108
|
+
function resolveAlias(filepath, alias) {
|
|
109
109
|
const result = filepath;
|
|
110
110
|
if (Array.isArray(alias)) {
|
|
111
111
|
for (const { find, replacement } of alias)
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveAlias,
|
|
10
10
|
shouldTransform,
|
|
11
11
|
stringifyComponentImport
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-V5TNASXD.mjs";
|
|
13
13
|
import {
|
|
14
14
|
__require,
|
|
15
15
|
__spreadProps,
|
|
@@ -24,7 +24,7 @@ import chokidar from "chokidar";
|
|
|
24
24
|
// src/core/context.ts
|
|
25
25
|
import { relative as relative2 } from "path";
|
|
26
26
|
import Debug5 from "debug";
|
|
27
|
-
import { throttle, toArray as toArray2
|
|
27
|
+
import { slash as slash3, throttle, toArray as toArray2 } from "@antfu/utils";
|
|
28
28
|
|
|
29
29
|
// src/core/options.ts
|
|
30
30
|
import { join, resolve } from "path";
|
|
@@ -62,7 +62,7 @@ function resolveOptions(options, root) {
|
|
|
62
62
|
if (!resolved.extensions.length)
|
|
63
63
|
throw new Error("[unplugin-vue-components] `extensions` option is required to search for components");
|
|
64
64
|
}
|
|
65
|
-
resolved.dts = !
|
|
65
|
+
resolved.dts = !resolved.dts ? false : resolve(root, typeof resolved.dts === "string" ? resolved.dts : "components.d.ts");
|
|
66
66
|
resolved.root = root;
|
|
67
67
|
resolved.transformer = options.transformer || getVueVersion() || "vue3";
|
|
68
68
|
resolved.directives = typeof options.directives === "boolean" ? options.directives : !resolved.resolvers.some((i) => i.type === "directive") ? false : getVueVersion() === "vue3";
|
|
@@ -100,8 +100,8 @@ function searchComponents(ctx) {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
// src/core/declaration.ts
|
|
103
|
-
import { dirname,
|
|
104
|
-
import { promises as fs
|
|
103
|
+
import { dirname, isAbsolute, relative } from "path";
|
|
104
|
+
import { existsSync, promises as fs } from "fs";
|
|
105
105
|
import { notNullish, slash as slash2 } from "@antfu/utils";
|
|
106
106
|
function parseDeclaration(code) {
|
|
107
107
|
if (!code)
|
|
@@ -526,7 +526,7 @@ var unplugin_default = createUnplugin((options = {}) => {
|
|
|
526
526
|
vite: {
|
|
527
527
|
configResolved(config) {
|
|
528
528
|
ctx.setRoot(config.root);
|
|
529
|
-
ctx.sourcemap =
|
|
529
|
+
ctx.sourcemap = true;
|
|
530
530
|
if (config.plugins.find((i) => i.name === "vite-plugin-vue2"))
|
|
531
531
|
ctx.setTransformer("vue2");
|
|
532
532
|
if (options.dts) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk42OWKG5Wjs = require('./chunk-42OWKG5W.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -49,7 +49,7 @@ function resolveOptions(options, root) {
|
|
|
49
49
|
const resolved = Object.assign({}, defaultOptions, options);
|
|
50
50
|
resolved.libraries = _utils.toArray.call(void 0, resolved.libraries).map((i) => typeof i === "string" ? { name: i } : i);
|
|
51
51
|
resolved.resolvers = normalizeResolvers(resolved.resolvers);
|
|
52
|
-
resolved.resolvers.push(...resolved.libraries.map((lib) =>
|
|
52
|
+
resolved.resolvers.push(...resolved.libraries.map((lib) => _chunk42OWKG5Wjs.LibraryResolver.call(void 0, lib)));
|
|
53
53
|
resolved.extensions = _utils.toArray.call(void 0, resolved.extensions);
|
|
54
54
|
if (resolved.globs) {
|
|
55
55
|
resolved.globs = _utils.toArray.call(void 0, resolved.globs).map((glob) => _utils.slash.call(void 0, _path.resolve.call(void 0, root, glob)));
|
|
@@ -62,7 +62,7 @@ function resolveOptions(options, root) {
|
|
|
62
62
|
if (!resolved.extensions.length)
|
|
63
63
|
throw new Error("[unplugin-vue-components] `extensions` option is required to search for components");
|
|
64
64
|
}
|
|
65
|
-
resolved.dts = !
|
|
65
|
+
resolved.dts = !resolved.dts ? false : _path.resolve.call(void 0, root, typeof resolved.dts === "string" ? resolved.dts : "components.d.ts");
|
|
66
66
|
resolved.root = root;
|
|
67
67
|
resolved.transformer = options.transformer || getVueVersion() || "vue3";
|
|
68
68
|
resolved.directives = typeof options.directives === "boolean" ? options.directives : !resolved.resolvers.some((i) => i.type === "directive") ? false : getVueVersion() === "vue3";
|
|
@@ -112,7 +112,7 @@ async function generateDeclaration(ctx, root, filepath) {
|
|
|
112
112
|
const imports = Object.fromEntries(Object.values(_chunkHIJQIC5Vjs.__spreadValues.call(void 0, _chunkHIJQIC5Vjs.__spreadValues.call(void 0, {}, ctx.componentNameMap), ctx.componentCustomMap)).map(({ path, name, importName }) => {
|
|
113
113
|
if (!name)
|
|
114
114
|
return void 0;
|
|
115
|
-
path =
|
|
115
|
+
path = _chunk42OWKG5Wjs.getTransformedPath.call(void 0, path, ctx);
|
|
116
116
|
const related = _path.isAbsolute.call(void 0, path) ? `./${_path.relative.call(void 0, _path.dirname.call(void 0, filepath), path)}` : path;
|
|
117
117
|
let entry = `typeof import('${_utils.slash.call(void 0, related)}')`;
|
|
118
118
|
if (importName)
|
|
@@ -188,12 +188,12 @@ async function transformComponent(code, transformer2, s, ctx, sfcPath) {
|
|
|
188
188
|
const results = transformer2 === "vue2" ? resolveVue2(code, s) : resolveVue3(code, s);
|
|
189
189
|
for (const { rawName, replace } of results) {
|
|
190
190
|
debug2(`| ${rawName}`);
|
|
191
|
-
const name =
|
|
191
|
+
const name = _chunk42OWKG5Wjs.pascalCase.call(void 0, rawName);
|
|
192
192
|
ctx.updateUsageMap(sfcPath, [name]);
|
|
193
193
|
const component = await ctx.findComponent(name, "component", [sfcPath]);
|
|
194
194
|
if (component) {
|
|
195
195
|
const varName = `__unplugin_components_${no}`;
|
|
196
|
-
s.prepend(`${
|
|
196
|
+
s.prepend(`${_chunk42OWKG5Wjs.stringifyComponentImport.call(void 0, _chunkHIJQIC5Vjs.__spreadProps.call(void 0, _chunkHIJQIC5Vjs.__spreadValues.call(void 0, {}, component), { name: varName }), ctx)};
|
|
197
197
|
`);
|
|
198
198
|
no += 1;
|
|
199
199
|
replace(varName);
|
|
@@ -283,13 +283,13 @@ async function transformDirective(code, transformer2, s, ctx, sfcPath) {
|
|
|
283
283
|
const results = await (transformer2 === "vue2" ? resolveVue22(code, s) : resolveVue32(code, s));
|
|
284
284
|
for (const { rawName, replace } of results) {
|
|
285
285
|
debug3(`| ${rawName}`);
|
|
286
|
-
const name =
|
|
286
|
+
const name = _chunk42OWKG5Wjs.pascalCase.call(void 0, rawName);
|
|
287
287
|
ctx.updateUsageMap(sfcPath, [name]);
|
|
288
288
|
const directive = await ctx.findComponent(name, "directive", [sfcPath]);
|
|
289
289
|
if (!directive)
|
|
290
290
|
continue;
|
|
291
291
|
const varName = `__unplugin_directives_${no}`;
|
|
292
|
-
s.prepend(`${
|
|
292
|
+
s.prepend(`${_chunk42OWKG5Wjs.stringifyComponentImport.call(void 0, _chunkHIJQIC5Vjs.__spreadProps.call(void 0, _chunkHIJQIC5Vjs.__spreadValues.call(void 0, {}, directive), { name: varName }), ctx)};
|
|
293
293
|
`);
|
|
294
294
|
no += 1;
|
|
295
295
|
replace(varName);
|
|
@@ -308,7 +308,7 @@ function transformer(ctx, transformer2) {
|
|
|
308
308
|
await transformComponent(code, transformer2, s, ctx, sfcPath);
|
|
309
309
|
if (ctx.options.directives)
|
|
310
310
|
await transformDirective(code, transformer2, s, ctx, sfcPath);
|
|
311
|
-
s.prepend(
|
|
311
|
+
s.prepend(_chunk42OWKG5Wjs.DISABLE_COMMENT);
|
|
312
312
|
const result = { code: s.toString() };
|
|
313
313
|
if (ctx.sourcemap)
|
|
314
314
|
result.map = s.generateMap({ source: id, includeContent: true });
|
|
@@ -352,7 +352,7 @@ var Context = class {
|
|
|
352
352
|
this.transformer = transformer(this, name || "vue3");
|
|
353
353
|
}
|
|
354
354
|
transform(code, id) {
|
|
355
|
-
const { path, query } =
|
|
355
|
+
const { path, query } = _chunk42OWKG5Wjs.parseId.call(void 0, id);
|
|
356
356
|
return this.transformer(code, id, path, query);
|
|
357
357
|
}
|
|
358
358
|
setupViteServer(server) {
|
|
@@ -364,13 +364,13 @@ var Context = class {
|
|
|
364
364
|
setupWatcher(watcher) {
|
|
365
365
|
const { globs } = this.options;
|
|
366
366
|
watcher.on("unlink", (path) => {
|
|
367
|
-
if (!
|
|
367
|
+
if (!_chunk42OWKG5Wjs.matchGlobs.call(void 0, path, globs))
|
|
368
368
|
return;
|
|
369
369
|
this.removeComponents(path);
|
|
370
370
|
this.onUpdate(path);
|
|
371
371
|
});
|
|
372
372
|
watcher.on("add", (path) => {
|
|
373
|
-
if (!
|
|
373
|
+
if (!_chunk42OWKG5Wjs.matchGlobs.call(void 0, path, globs))
|
|
374
374
|
return;
|
|
375
375
|
this.addComponents(path);
|
|
376
376
|
this.onUpdate(path);
|
|
@@ -416,7 +416,7 @@ var Context = class {
|
|
|
416
416
|
updates: []
|
|
417
417
|
};
|
|
418
418
|
const timestamp = +new Date();
|
|
419
|
-
const name =
|
|
419
|
+
const name = _chunk42OWKG5Wjs.pascalCase.call(void 0, _chunk42OWKG5Wjs.getNameFromFilePath.call(void 0, path, this.options));
|
|
420
420
|
Object.entries(this._componentUsageMap).forEach(([key, values]) => {
|
|
421
421
|
if (values.has(name)) {
|
|
422
422
|
const r = `/${_utils.slash.call(void 0, _path.relative.call(void 0, this.root, key))}`;
|
|
@@ -434,7 +434,7 @@ var Context = class {
|
|
|
434
434
|
updateComponentNameMap() {
|
|
435
435
|
this._componentNameMap = {};
|
|
436
436
|
Array.from(this._componentPaths).forEach((path) => {
|
|
437
|
-
const name =
|
|
437
|
+
const name = _chunk42OWKG5Wjs.pascalCase.call(void 0, _chunk42OWKG5Wjs.getNameFromFilePath.call(void 0, path, this.options));
|
|
438
438
|
if (this._componentNameMap[name] && !this.options.allowOverrides) {
|
|
439
439
|
console.warn(`[unplugin-vue-components] component "${name}"(${path}) has naming conflicts with other components, ignored.`);
|
|
440
440
|
return;
|
|
@@ -474,7 +474,7 @@ var Context = class {
|
|
|
474
474
|
}
|
|
475
475
|
normalizePath(path) {
|
|
476
476
|
var _a, _b, _c;
|
|
477
|
-
return
|
|
477
|
+
return _chunk42OWKG5Wjs.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) || []);
|
|
478
478
|
}
|
|
479
479
|
relative(path) {
|
|
480
480
|
if (path.startsWith("/") && !path.startsWith(this.root))
|
|
@@ -513,7 +513,7 @@ var unplugin_default = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
513
513
|
return filter(id);
|
|
514
514
|
},
|
|
515
515
|
async transform(code, id) {
|
|
516
|
-
if (!
|
|
516
|
+
if (!_chunk42OWKG5Wjs.shouldTransform.call(void 0, code))
|
|
517
517
|
return null;
|
|
518
518
|
try {
|
|
519
519
|
const result = await ctx.transform(code, id);
|
|
@@ -526,7 +526,7 @@ var unplugin_default = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
526
526
|
vite: {
|
|
527
527
|
configResolved(config) {
|
|
528
528
|
ctx.setRoot(config.root);
|
|
529
|
-
ctx.sourcemap =
|
|
529
|
+
ctx.sourcemap = true;
|
|
530
530
|
if (config.plugins.find((i) => i.name === "vite-plugin-vue2"))
|
|
531
531
|
ctx.setTransformer("vue2");
|
|
532
532
|
if (options.dts) {
|
|
@@ -4,8 +4,8 @@ import minimatch from "minimatch";
|
|
|
4
4
|
import resolve from "resolve";
|
|
5
5
|
import { slash, toArray } from "@antfu/utils";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
getPackageInfo,
|
|
8
|
+
isPackageExists
|
|
9
9
|
} from "local-pkg";
|
|
10
10
|
|
|
11
11
|
// src/core/constants.ts
|
|
@@ -105,7 +105,7 @@ function getNameFromFilePath(filePath, options) {
|
|
|
105
105
|
}
|
|
106
106
|
return filename;
|
|
107
107
|
}
|
|
108
|
-
function resolveAlias(filepath, alias
|
|
108
|
+
function resolveAlias(filepath, alias) {
|
|
109
109
|
const result = filepath;
|
|
110
110
|
if (Array.isArray(alias)) {
|
|
111
111
|
for (const { find, replacement } of alias)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild';
|
|
2
|
+
import { Options } from './types';
|
|
3
|
+
import '@rollup/pluginutils';
|
|
4
|
+
import 'unplugin';
|
|
5
|
+
import '@antfu/utils';
|
|
6
|
+
|
|
7
|
+
declare const _default: (options?: Options | undefined) => esbuild.Plugin;
|
|
8
|
+
|
|
9
|
+
export { _default as default };
|
package/dist/esbuild.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkPBOKHWI5js = require('./chunk-PBOKHWI5.js');
|
|
4
|
+
require('./chunk-42OWKG5W.js');
|
|
5
|
+
require('./chunk-GGNOJ77I.js');
|
|
6
|
+
require('./chunk-HIJQIC5V.js');
|
|
7
|
+
|
|
8
|
+
// src/esbuild.ts
|
|
9
|
+
var esbuild_default = _chunkPBOKHWI5js.unplugin_default.esbuild;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
module.exports = esbuild_default;
|
|
13
|
+
exports.default = module.exports;
|
package/dist/esbuild.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
unplugin_default
|
|
3
|
+
} from "./chunk-KCFA67G3.mjs";
|
|
4
|
+
import "./chunk-V5TNASXD.mjs";
|
|
5
|
+
import "./chunk-WBQAMGXK.mjs";
|
|
6
|
+
import "./chunk-EKXJN6YJ.mjs";
|
|
7
|
+
|
|
8
|
+
// src/esbuild.ts
|
|
9
|
+
var esbuild_default = unplugin_default.esbuild;
|
|
10
|
+
export {
|
|
11
|
+
esbuild_default as default
|
|
12
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkPBOKHWI5js = require('./chunk-PBOKHWI5.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk42OWKG5Wjs = require('./chunk-42OWKG5W.js');
|
|
9
9
|
require('./chunk-GGNOJ77I.js');
|
|
10
10
|
require('./chunk-HIJQIC5V.js');
|
|
11
11
|
|
|
@@ -13,4 +13,4 @@ require('./chunk-HIJQIC5V.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.camelCase =
|
|
16
|
+
exports.camelCase = _chunk42OWKG5Wjs.camelCase; exports.default = _chunkPBOKHWI5js.unplugin_default; exports.kebabCase = _chunk42OWKG5Wjs.kebabCase; exports.pascalCase = _chunk42OWKG5Wjs.pascalCase;
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unplugin_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KCFA67G3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
camelCase,
|
|
6
6
|
kebabCase,
|
|
7
7
|
pascalCase
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-V5TNASXD.mjs";
|
|
9
9
|
import "./chunk-WBQAMGXK.mjs";
|
|
10
10
|
import "./chunk-EKXJN6YJ.mjs";
|
|
11
11
|
export {
|
package/dist/nuxt.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkPBOKHWI5js = require('./chunk-PBOKHWI5.js');
|
|
4
|
+
require('./chunk-42OWKG5W.js');
|
|
5
5
|
require('./chunk-GGNOJ77I.js');
|
|
6
6
|
require('./chunk-HIJQIC5V.js');
|
|
7
7
|
|
|
@@ -9,11 +9,11 @@ require('./chunk-HIJQIC5V.js');
|
|
|
9
9
|
function nuxt_default(options) {
|
|
10
10
|
this.extendBuild((config) => {
|
|
11
11
|
config.plugins = config.plugins || [];
|
|
12
|
-
config.plugins.unshift(
|
|
12
|
+
config.plugins.unshift(_chunkPBOKHWI5js.unplugin_default.webpack(options));
|
|
13
13
|
});
|
|
14
14
|
this.nuxt.hook("vite:extend", async (vite) => {
|
|
15
15
|
vite.config.plugins = vite.config.plugins || [];
|
|
16
|
-
vite.config.plugins.push(
|
|
16
|
+
vite.config.plugins.push(_chunkPBOKHWI5js.unplugin_default.vite(options));
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
package/dist/nuxt.mjs
CHANGED
package/dist/resolvers.d.ts
CHANGED
|
@@ -101,12 +101,20 @@ interface ElementUiResolverOptions {
|
|
|
101
101
|
*/
|
|
102
102
|
declare function ElementUiResolver(options?: ElementUiResolverOptions): ComponentResolver;
|
|
103
103
|
|
|
104
|
+
interface HeadlessUiResolverOptions {
|
|
105
|
+
/**
|
|
106
|
+
* prefix for headless ui components used in templates
|
|
107
|
+
*
|
|
108
|
+
* @default ""
|
|
109
|
+
*/
|
|
110
|
+
prefix?: string;
|
|
111
|
+
}
|
|
104
112
|
/**
|
|
105
113
|
* Resolver for headlessui
|
|
106
114
|
*
|
|
107
115
|
* @link https://github.com/tailwindlabs/headlessui
|
|
108
116
|
*/
|
|
109
|
-
declare function HeadlessUiResolver(): ComponentResolver;
|
|
117
|
+
declare function HeadlessUiResolver({ prefix, }: HeadlessUiResolverOptions): ComponentResolver;
|
|
110
118
|
|
|
111
119
|
interface IduxResolverOptions {
|
|
112
120
|
/**
|
|
@@ -127,6 +135,14 @@ interface IduxResolverOptions {
|
|
|
127
135
|
*/
|
|
128
136
|
declare function IduxResolver(options?: IduxResolverOptions): ComponentResolver;
|
|
129
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Resolver for Inkline
|
|
140
|
+
*
|
|
141
|
+
* @author @alexgrozav
|
|
142
|
+
* @link https://github.com/inkline/inkline
|
|
143
|
+
*/
|
|
144
|
+
declare function InklineResolver(): ComponentResolver;
|
|
145
|
+
|
|
130
146
|
/**
|
|
131
147
|
* Resolver for Naive UI
|
|
132
148
|
*
|
|
@@ -156,6 +172,12 @@ interface PrimeVueResolverOptions {
|
|
|
156
172
|
* @default ''
|
|
157
173
|
*/
|
|
158
174
|
importTheme?: string;
|
|
175
|
+
/**
|
|
176
|
+
* prefix for components (e.g. 'P' to resolve Menu from PMenu)
|
|
177
|
+
*
|
|
178
|
+
* @default ''
|
|
179
|
+
*/
|
|
180
|
+
prefix?: string;
|
|
159
181
|
}
|
|
160
182
|
/**
|
|
161
183
|
* Resolver for PrimeVue - If you're using a component with the same tag as an native HTML element (e.g. button) the component must be in uppercase
|
|
@@ -307,7 +329,51 @@ interface DevResolverOptions {
|
|
|
307
329
|
}
|
|
308
330
|
declare function DevUiResolver(options?: DevResolverOptions): ComponentResolver[];
|
|
309
331
|
|
|
332
|
+
interface ArcoResolverOptions {
|
|
333
|
+
/**
|
|
334
|
+
* import style css or less with components
|
|
335
|
+
*
|
|
336
|
+
* @default 'css'
|
|
337
|
+
*/
|
|
338
|
+
importStyle?: boolean | 'css' | 'less';
|
|
339
|
+
/**
|
|
340
|
+
* resolve icons
|
|
341
|
+
*
|
|
342
|
+
* @default false
|
|
343
|
+
*/
|
|
344
|
+
resolveIcons?: boolean;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Resolver for Arco Design Vue
|
|
348
|
+
*
|
|
349
|
+
* Requires arco-design/web-vue@2.11.0 or later
|
|
350
|
+
*
|
|
351
|
+
* @author @flsion
|
|
352
|
+
* @link https://arco.design/ for arco-design
|
|
353
|
+
*
|
|
354
|
+
*/
|
|
355
|
+
declare function ArcoResolver(options?: ArcoResolverOptions): ComponentResolver;
|
|
356
|
+
|
|
357
|
+
interface TDesignResolverOptions {
|
|
358
|
+
/**
|
|
359
|
+
* import style along with components
|
|
360
|
+
* @default 'css'
|
|
361
|
+
*/
|
|
362
|
+
importStyle?: boolean | 'css' | 'less';
|
|
363
|
+
/**
|
|
364
|
+
* select the specified library
|
|
365
|
+
* @default 'vue'
|
|
366
|
+
*/
|
|
367
|
+
library?: 'vue' | 'vue-next' | 'react' | 'mobile-vue' | 'mobile-react';
|
|
368
|
+
/**
|
|
369
|
+
* resolve `tdesign-icons'
|
|
370
|
+
* @default false
|
|
371
|
+
*/
|
|
372
|
+
resolveIcons?: boolean;
|
|
373
|
+
}
|
|
374
|
+
declare function TDesignResolver(options?: TDesignResolverOptions): ComponentResolver;
|
|
375
|
+
|
|
310
376
|
declare function tryLoadVeturTags(name: string): string[] | undefined;
|
|
311
377
|
declare function LibraryResolver(options: UILibraryOptions): ComponentResolverObject;
|
|
312
378
|
|
|
313
|
-
export { AntDesignVueResolver, AntDesignVueResolverOptions, DevResolverOptions, DevUiResolver, ElementPlusResolver, ElementPlusResolverOptions, ElementUiResolver, ElementUiResolverOptions, HeadlessUiResolver, IduxResolver, IduxResolverOptions, LibraryResolver, NaiveUiResolver, PrimeVueResolver, PrimeVueResolverOptions, QuasarResolver, VantResolver, VantResolverOptions, VarletUIResolver, VarletUIResolverOptions, VeuiResolver, VeuiResolverOptions, ViewUiResolver, VueUseComponentsResolver, VuetifyResolver, getResolved, tryLoadVeturTags };
|
|
379
|
+
export { AntDesignVueResolver, AntDesignVueResolverOptions, ArcoResolver, ArcoResolverOptions, DevResolverOptions, DevUiResolver, ElementPlusResolver, ElementPlusResolverOptions, ElementUiResolver, ElementUiResolverOptions, HeadlessUiResolver, HeadlessUiResolverOptions, IduxResolver, IduxResolverOptions, InklineResolver, LibraryResolver, NaiveUiResolver, PrimeVueResolver, PrimeVueResolverOptions, QuasarResolver, TDesignResolver, TDesignResolverOptions, VantResolver, VantResolverOptions, VarletUIResolver, VarletUIResolverOptions, VeuiResolver, VeuiResolverOptions, ViewUiResolver, VueUseComponentsResolver, VuetifyResolver, getResolved, tryLoadVeturTags };
|