unplugin-vue-components 0.17.8 → 0.17.13
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-OF6KPWRN.mjs → chunk-KCFA67G3.mjs} +7 -6
- package/dist/{chunk-TFMUKG5V.js → chunk-PBOKHWI5.js} +18 -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 +75 -3
- package/dist/resolvers.js +294 -57
- package/dist/resolvers.mjs +279 -42
- 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";
|
|
@@ -53,6 +53,7 @@ function resolveOptions(options, root) {
|
|
|
53
53
|
resolved.extensions = toArray(resolved.extensions);
|
|
54
54
|
if (resolved.globs) {
|
|
55
55
|
resolved.globs = toArray(resolved.globs).map((glob) => slash(resolve(root, glob)));
|
|
56
|
+
resolved.resolvedDirs = [];
|
|
56
57
|
} else {
|
|
57
58
|
const extsGlob = resolved.extensions.length === 1 ? resolved.extensions : `{${resolved.extensions.join(",")}}`;
|
|
58
59
|
resolved.dirs = toArray(resolved.dirs);
|
|
@@ -61,7 +62,7 @@ function resolveOptions(options, root) {
|
|
|
61
62
|
if (!resolved.extensions.length)
|
|
62
63
|
throw new Error("[unplugin-vue-components] `extensions` option is required to search for components");
|
|
63
64
|
}
|
|
64
|
-
resolved.dts = !
|
|
65
|
+
resolved.dts = !resolved.dts ? false : resolve(root, typeof resolved.dts === "string" ? resolved.dts : "components.d.ts");
|
|
65
66
|
resolved.root = root;
|
|
66
67
|
resolved.transformer = options.transformer || getVueVersion() || "vue3";
|
|
67
68
|
resolved.directives = typeof options.directives === "boolean" ? options.directives : !resolved.resolvers.some((i) => i.type === "directive") ? false : getVueVersion() === "vue3";
|
|
@@ -99,8 +100,8 @@ function searchComponents(ctx) {
|
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
// src/core/declaration.ts
|
|
102
|
-
import { dirname,
|
|
103
|
-
import { promises as fs
|
|
103
|
+
import { dirname, isAbsolute, relative } from "path";
|
|
104
|
+
import { existsSync, promises as fs } from "fs";
|
|
104
105
|
import { notNullish, slash as slash2 } from "@antfu/utils";
|
|
105
106
|
function parseDeclaration(code) {
|
|
106
107
|
if (!code)
|
|
@@ -525,7 +526,7 @@ var unplugin_default = createUnplugin((options = {}) => {
|
|
|
525
526
|
vite: {
|
|
526
527
|
configResolved(config) {
|
|
527
528
|
ctx.setRoot(config.root);
|
|
528
|
-
ctx.sourcemap =
|
|
529
|
+
ctx.sourcemap = true;
|
|
529
530
|
if (config.plugins.find((i) => i.name === "vite-plugin-vue2"))
|
|
530
531
|
ctx.setTransformer("vue2");
|
|
531
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,10 +49,11 @@ 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)));
|
|
56
|
+
resolved.resolvedDirs = [];
|
|
56
57
|
} else {
|
|
57
58
|
const extsGlob = resolved.extensions.length === 1 ? resolved.extensions : `{${resolved.extensions.join(",")}}`;
|
|
58
59
|
resolved.dirs = _utils.toArray.call(void 0, resolved.dirs);
|
|
@@ -61,7 +62,7 @@ function resolveOptions(options, root) {
|
|
|
61
62
|
if (!resolved.extensions.length)
|
|
62
63
|
throw new Error("[unplugin-vue-components] `extensions` option is required to search for components");
|
|
63
64
|
}
|
|
64
|
-
resolved.dts = !
|
|
65
|
+
resolved.dts = !resolved.dts ? false : _path.resolve.call(void 0, root, typeof resolved.dts === "string" ? resolved.dts : "components.d.ts");
|
|
65
66
|
resolved.root = root;
|
|
66
67
|
resolved.transformer = options.transformer || getVueVersion() || "vue3";
|
|
67
68
|
resolved.directives = typeof options.directives === "boolean" ? options.directives : !resolved.resolvers.some((i) => i.type === "directive") ? false : getVueVersion() === "vue3";
|
|
@@ -111,7 +112,7 @@ async function generateDeclaration(ctx, root, filepath) {
|
|
|
111
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 }) => {
|
|
112
113
|
if (!name)
|
|
113
114
|
return void 0;
|
|
114
|
-
path =
|
|
115
|
+
path = _chunk42OWKG5Wjs.getTransformedPath.call(void 0, path, ctx);
|
|
115
116
|
const related = _path.isAbsolute.call(void 0, path) ? `./${_path.relative.call(void 0, _path.dirname.call(void 0, filepath), path)}` : path;
|
|
116
117
|
let entry = `typeof import('${_utils.slash.call(void 0, related)}')`;
|
|
117
118
|
if (importName)
|
|
@@ -187,12 +188,12 @@ async function transformComponent(code, transformer2, s, ctx, sfcPath) {
|
|
|
187
188
|
const results = transformer2 === "vue2" ? resolveVue2(code, s) : resolveVue3(code, s);
|
|
188
189
|
for (const { rawName, replace } of results) {
|
|
189
190
|
debug2(`| ${rawName}`);
|
|
190
|
-
const name =
|
|
191
|
+
const name = _chunk42OWKG5Wjs.pascalCase.call(void 0, rawName);
|
|
191
192
|
ctx.updateUsageMap(sfcPath, [name]);
|
|
192
193
|
const component = await ctx.findComponent(name, "component", [sfcPath]);
|
|
193
194
|
if (component) {
|
|
194
195
|
const varName = `__unplugin_components_${no}`;
|
|
195
|
-
s.prepend(`${
|
|
196
|
+
s.prepend(`${_chunk42OWKG5Wjs.stringifyComponentImport.call(void 0, _chunkHIJQIC5Vjs.__spreadProps.call(void 0, _chunkHIJQIC5Vjs.__spreadValues.call(void 0, {}, component), { name: varName }), ctx)};
|
|
196
197
|
`);
|
|
197
198
|
no += 1;
|
|
198
199
|
replace(varName);
|
|
@@ -282,13 +283,13 @@ async function transformDirective(code, transformer2, s, ctx, sfcPath) {
|
|
|
282
283
|
const results = await (transformer2 === "vue2" ? resolveVue22(code, s) : resolveVue32(code, s));
|
|
283
284
|
for (const { rawName, replace } of results) {
|
|
284
285
|
debug3(`| ${rawName}`);
|
|
285
|
-
const name =
|
|
286
|
+
const name = _chunk42OWKG5Wjs.pascalCase.call(void 0, rawName);
|
|
286
287
|
ctx.updateUsageMap(sfcPath, [name]);
|
|
287
288
|
const directive = await ctx.findComponent(name, "directive", [sfcPath]);
|
|
288
289
|
if (!directive)
|
|
289
290
|
continue;
|
|
290
291
|
const varName = `__unplugin_directives_${no}`;
|
|
291
|
-
s.prepend(`${
|
|
292
|
+
s.prepend(`${_chunk42OWKG5Wjs.stringifyComponentImport.call(void 0, _chunkHIJQIC5Vjs.__spreadProps.call(void 0, _chunkHIJQIC5Vjs.__spreadValues.call(void 0, {}, directive), { name: varName }), ctx)};
|
|
292
293
|
`);
|
|
293
294
|
no += 1;
|
|
294
295
|
replace(varName);
|
|
@@ -307,7 +308,7 @@ function transformer(ctx, transformer2) {
|
|
|
307
308
|
await transformComponent(code, transformer2, s, ctx, sfcPath);
|
|
308
309
|
if (ctx.options.directives)
|
|
309
310
|
await transformDirective(code, transformer2, s, ctx, sfcPath);
|
|
310
|
-
s.prepend(
|
|
311
|
+
s.prepend(_chunk42OWKG5Wjs.DISABLE_COMMENT);
|
|
311
312
|
const result = { code: s.toString() };
|
|
312
313
|
if (ctx.sourcemap)
|
|
313
314
|
result.map = s.generateMap({ source: id, includeContent: true });
|
|
@@ -351,7 +352,7 @@ var Context = class {
|
|
|
351
352
|
this.transformer = transformer(this, name || "vue3");
|
|
352
353
|
}
|
|
353
354
|
transform(code, id) {
|
|
354
|
-
const { path, query } =
|
|
355
|
+
const { path, query } = _chunk42OWKG5Wjs.parseId.call(void 0, id);
|
|
355
356
|
return this.transformer(code, id, path, query);
|
|
356
357
|
}
|
|
357
358
|
setupViteServer(server) {
|
|
@@ -363,13 +364,13 @@ var Context = class {
|
|
|
363
364
|
setupWatcher(watcher) {
|
|
364
365
|
const { globs } = this.options;
|
|
365
366
|
watcher.on("unlink", (path) => {
|
|
366
|
-
if (!
|
|
367
|
+
if (!_chunk42OWKG5Wjs.matchGlobs.call(void 0, path, globs))
|
|
367
368
|
return;
|
|
368
369
|
this.removeComponents(path);
|
|
369
370
|
this.onUpdate(path);
|
|
370
371
|
});
|
|
371
372
|
watcher.on("add", (path) => {
|
|
372
|
-
if (!
|
|
373
|
+
if (!_chunk42OWKG5Wjs.matchGlobs.call(void 0, path, globs))
|
|
373
374
|
return;
|
|
374
375
|
this.addComponents(path);
|
|
375
376
|
this.onUpdate(path);
|
|
@@ -415,7 +416,7 @@ var Context = class {
|
|
|
415
416
|
updates: []
|
|
416
417
|
};
|
|
417
418
|
const timestamp = +new Date();
|
|
418
|
-
const name =
|
|
419
|
+
const name = _chunk42OWKG5Wjs.pascalCase.call(void 0, _chunk42OWKG5Wjs.getNameFromFilePath.call(void 0, path, this.options));
|
|
419
420
|
Object.entries(this._componentUsageMap).forEach(([key, values]) => {
|
|
420
421
|
if (values.has(name)) {
|
|
421
422
|
const r = `/${_utils.slash.call(void 0, _path.relative.call(void 0, this.root, key))}`;
|
|
@@ -433,7 +434,7 @@ var Context = class {
|
|
|
433
434
|
updateComponentNameMap() {
|
|
434
435
|
this._componentNameMap = {};
|
|
435
436
|
Array.from(this._componentPaths).forEach((path) => {
|
|
436
|
-
const name =
|
|
437
|
+
const name = _chunk42OWKG5Wjs.pascalCase.call(void 0, _chunk42OWKG5Wjs.getNameFromFilePath.call(void 0, path, this.options));
|
|
437
438
|
if (this._componentNameMap[name] && !this.options.allowOverrides) {
|
|
438
439
|
console.warn(`[unplugin-vue-components] component "${name}"(${path}) has naming conflicts with other components, ignored.`);
|
|
439
440
|
return;
|
|
@@ -473,7 +474,7 @@ var Context = class {
|
|
|
473
474
|
}
|
|
474
475
|
normalizePath(path) {
|
|
475
476
|
var _a, _b, _c;
|
|
476
|
-
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) || []);
|
|
477
478
|
}
|
|
478
479
|
relative(path) {
|
|
479
480
|
if (path.startsWith("/") && !path.startsWith(this.root))
|
|
@@ -512,7 +513,7 @@ var unplugin_default = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
512
513
|
return filter(id);
|
|
513
514
|
},
|
|
514
515
|
async transform(code, id) {
|
|
515
|
-
if (!
|
|
516
|
+
if (!_chunk42OWKG5Wjs.shouldTransform.call(void 0, code))
|
|
516
517
|
return null;
|
|
517
518
|
try {
|
|
518
519
|
const result = await ctx.transform(code, id);
|
|
@@ -525,7 +526,7 @@ var unplugin_default = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
525
526
|
vite: {
|
|
526
527
|
configResolved(config) {
|
|
527
528
|
ctx.setRoot(config.root);
|
|
528
|
-
ctx.sourcemap =
|
|
529
|
+
ctx.sourcemap = true;
|
|
529
530
|
if (config.plugins.find((i) => i.name === "vite-plugin-vue2"))
|
|
530
531
|
ctx.setTransformer("vue2");
|
|
531
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,26 +101,48 @@ 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 {
|
|
120
|
+
/**
|
|
121
|
+
* exclude components that do not require automatic import
|
|
122
|
+
*
|
|
123
|
+
* @default []
|
|
124
|
+
*/
|
|
125
|
+
exclude?: string[];
|
|
112
126
|
/**
|
|
113
127
|
* import style along with components
|
|
114
128
|
*/
|
|
115
129
|
importStyle?: 'css' | 'less';
|
|
116
130
|
}
|
|
117
131
|
/**
|
|
118
|
-
* Resolver for `@idux/cdk` and
|
|
132
|
+
* Resolver for `@idux/cdk`, `@idux/components` and ``@idux/pro``
|
|
119
133
|
*
|
|
120
134
|
* @link https://idux.site
|
|
121
135
|
*/
|
|
122
136
|
declare function IduxResolver(options?: IduxResolverOptions): ComponentResolver;
|
|
123
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Resolver for Inkline
|
|
140
|
+
*
|
|
141
|
+
* @author @alexgrozav
|
|
142
|
+
* @link https://github.com/inkline/inkline
|
|
143
|
+
*/
|
|
144
|
+
declare function InklineResolver(): ComponentResolver;
|
|
145
|
+
|
|
124
146
|
/**
|
|
125
147
|
* Resolver for Naive UI
|
|
126
148
|
*
|
|
@@ -150,6 +172,12 @@ interface PrimeVueResolverOptions {
|
|
|
150
172
|
* @default ''
|
|
151
173
|
*/
|
|
152
174
|
importTheme?: string;
|
|
175
|
+
/**
|
|
176
|
+
* prefix for components (e.g. 'P' to resolve Menu from PMenu)
|
|
177
|
+
*
|
|
178
|
+
* @default ''
|
|
179
|
+
*/
|
|
180
|
+
prefix?: string;
|
|
153
181
|
}
|
|
154
182
|
/**
|
|
155
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
|
|
@@ -301,7 +329,51 @@ interface DevResolverOptions {
|
|
|
301
329
|
}
|
|
302
330
|
declare function DevUiResolver(options?: DevResolverOptions): ComponentResolver[];
|
|
303
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
|
+
|
|
304
376
|
declare function tryLoadVeturTags(name: string): string[] | undefined;
|
|
305
377
|
declare function LibraryResolver(options: UILibraryOptions): ComponentResolverObject;
|
|
306
378
|
|
|
307
|
-
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 };
|