vuetify-nuxt-module 0.5.7 → 0.5.9
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/dist/module.d.ts +3 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +14 -4
- package/dist/runtime/plugins/icons.mjs +7 -2
- package/package.json +9 -9
package/dist/module.d.ts
CHANGED
|
@@ -190,7 +190,10 @@ interface MOptions {
|
|
|
190
190
|
/**
|
|
191
191
|
* Vuetify styles.
|
|
192
192
|
*
|
|
193
|
+
* If you want to use configFile on SSR, you have to disable `experimental.inlineSSRStyles` in nuxt.config.
|
|
194
|
+
*
|
|
193
195
|
* @see https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin
|
|
196
|
+
* @see https://github.com/userquin/vuetify-nuxt-module/issues/78 and https://github.com/userquin/vuetify-nuxt-module/issues/74
|
|
194
197
|
*/
|
|
195
198
|
styles?: true | 'none' | 'expose' | 'sass' | {
|
|
196
199
|
configFile: string;
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import defu from 'defu';
|
|
|
3
3
|
import { debounce } from 'perfect-debounce';
|
|
4
4
|
import { existsSync, statSync } from 'node:fs';
|
|
5
5
|
import { resolve, dirname } from 'node:path';
|
|
6
|
+
import process from 'node:process';
|
|
6
7
|
import { createConfigLoader } from 'unconfig';
|
|
7
8
|
import { readFile, utimes } from 'node:fs/promises';
|
|
8
9
|
import { isPackageExists } from 'local-pkg';
|
|
@@ -11,7 +12,7 @@ import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';
|
|
|
11
12
|
import { isAbsolute, join, relative } from 'pathe';
|
|
12
13
|
import { normalizePath as normalizePath$1 } from 'vite';
|
|
13
14
|
|
|
14
|
-
const version = "0.5.
|
|
15
|
+
const version = "0.5.9";
|
|
15
16
|
|
|
16
17
|
const VIRTUAL_VUETIFY_CONFIGURATION = "virtual:vuetify-configuration";
|
|
17
18
|
const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_CONFIGURATION.slice("virtual:".length)}`;
|
|
@@ -196,6 +197,7 @@ const disabledResolvedIcons = Object.freeze({
|
|
|
196
197
|
unocssIconPrefix: "i-",
|
|
197
198
|
imports: [],
|
|
198
199
|
aliases: [],
|
|
200
|
+
aliasesImportPresent: false,
|
|
199
201
|
sets: [],
|
|
200
202
|
cdn: [],
|
|
201
203
|
local: [],
|
|
@@ -219,6 +221,7 @@ function prepareIcons(unocssPresent, logger, vuetifyOptions) {
|
|
|
219
221
|
defaultSet,
|
|
220
222
|
sets: [],
|
|
221
223
|
aliases: [],
|
|
224
|
+
aliasesImportPresent: false,
|
|
222
225
|
imports: [],
|
|
223
226
|
cdn: [],
|
|
224
227
|
local: [],
|
|
@@ -233,6 +236,7 @@ function prepareIcons(unocssPresent, logger, vuetifyOptions) {
|
|
|
233
236
|
sets = sets.filter((s) => s.name !== "unocss-mdi");
|
|
234
237
|
}
|
|
235
238
|
sets.filter((s) => cssFonts.includes(s.name)).forEach(({ name, cdn }) => {
|
|
239
|
+
resolvedIcons.aliasesImportPresent || (resolvedIcons.aliasesImportPresent = name === defaultSet);
|
|
236
240
|
if (name === "unocss-mdi")
|
|
237
241
|
return;
|
|
238
242
|
resolvedIcons.imports.push(`import {${name === defaultSet ? "aliases," : ""}${name}} from 'vuetify/iconsets/${name}'`);
|
|
@@ -272,6 +276,7 @@ function prepareIcons(unocssPresent, logger, vuetifyOptions) {
|
|
|
272
276
|
logger.warn("Missing @fortawesome/vue-fontawesome dependency, install it!");
|
|
273
277
|
}
|
|
274
278
|
if (faSvgExists) {
|
|
279
|
+
resolvedIcons.aliasesImportPresent || (resolvedIcons.aliasesImportPresent = defaultSet === "fa-svg");
|
|
275
280
|
resolvedIcons.imports.push(`import {${defaultSet === "fa-svg" ? "aliases," : ""}fa} from 'vuetify/iconsets/fa-svg'`);
|
|
276
281
|
resolvedIcons.imports.push("import { library } from '@fortawesome/fontawesome-svg-core'");
|
|
277
282
|
resolvedIcons.imports.push("import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'");
|
|
@@ -293,6 +298,7 @@ function prepareIcons(unocssPresent, logger, vuetifyOptions) {
|
|
|
293
298
|
const mdiSvgExists = isPackageExists("@mdi/js");
|
|
294
299
|
if (mdiSvgExists) {
|
|
295
300
|
resolvedIcons.svg.mdi = true;
|
|
301
|
+
resolvedIcons.aliasesImportPresent || (resolvedIcons.aliasesImportPresent = defaultSet === "mdi-svg");
|
|
296
302
|
resolvedIcons.imports.push(`import {${defaultSet === "mdi-svg" ? "aliases," : ""}mdi} from 'vuetify/iconsets/mdi-svg'`);
|
|
297
303
|
if (mdiSvg && mdiSvg.aliases) {
|
|
298
304
|
resolvedIcons.imports.push(`import {${Object.values(mdiSvg.aliases).join(",")}} from '@mdi/js'`);
|
|
@@ -882,13 +888,17 @@ ${unocss}
|
|
|
882
888
|
};
|
|
883
889
|
}
|
|
884
890
|
let aliases = "aliases,";
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
891
|
+
if (!ctx.icons.aliasesImportPresent || ctx.vuetifyOptions.icons && ctx.vuetifyOptions.icons.defaultSet === "custom") {
|
|
892
|
+
aliases = "";
|
|
893
|
+
} else {
|
|
894
|
+
const alias = ctx.icons.aliases;
|
|
895
|
+
if (alias.length) {
|
|
896
|
+
aliases = `aliases: {
|
|
888
897
|
...aliases,
|
|
889
898
|
${alias.join(",\n")}
|
|
890
899
|
},
|
|
891
900
|
`;
|
|
901
|
+
}
|
|
892
902
|
}
|
|
893
903
|
let unocss = "";
|
|
894
904
|
if (ctx.icons.unocss && ctx.icons.unocssAliases) {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { enabled, iconsConfiguration } from "virtual:vuetify-icons-configuration";
|
|
2
2
|
export function configureIcons(vuetifyOptions) {
|
|
3
|
-
if (enabled)
|
|
4
|
-
|
|
3
|
+
if (enabled) {
|
|
4
|
+
const icons = iconsConfiguration();
|
|
5
|
+
const custom = icons?.defaultSet === "custom";
|
|
6
|
+
if (custom)
|
|
7
|
+
return;
|
|
8
|
+
vuetifyOptions.icons = icons;
|
|
9
|
+
}
|
|
5
10
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuetify-nuxt-module",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.
|
|
5
|
-
"packageManager": "pnpm@8.
|
|
4
|
+
"version": "0.5.9",
|
|
5
|
+
"packageManager": "pnpm@8.7.4",
|
|
6
6
|
"description": "Zero-Config Nuxt Module for Vuetify",
|
|
7
7
|
"author": "userquin <userquin@gmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"vuetify": "^3.3.9"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@antfu/eslint-config": "^0.
|
|
76
|
-
"@antfu/ni": "^0.21.
|
|
75
|
+
"@antfu/eslint-config": "^0.41.0",
|
|
76
|
+
"@antfu/ni": "^0.21.8",
|
|
77
77
|
"@date-io/luxon": "^2.17.0",
|
|
78
78
|
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
|
79
79
|
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
|
80
80
|
"@fortawesome/vue-fontawesome": "^3.0.3",
|
|
81
|
-
"@iconify-json/carbon": "^1.1.
|
|
82
|
-
"@iconify-json/mdi": "^1.1.
|
|
81
|
+
"@iconify-json/carbon": "^1.1.21",
|
|
82
|
+
"@iconify-json/mdi": "^1.1.54",
|
|
83
83
|
"@mdi/js": "^7.2.96",
|
|
84
84
|
"@nuxt/devtools": "^0.7.0",
|
|
85
85
|
"@nuxt/module-builder": "^0.4.0",
|
|
@@ -89,12 +89,12 @@
|
|
|
89
89
|
"@parcel/watcher": "^2.2.0",
|
|
90
90
|
"@types/node": "^18",
|
|
91
91
|
"@unocss/nuxt": "^0.53.6",
|
|
92
|
-
"bumpp": "^9.
|
|
93
|
-
"eslint": "^8.
|
|
92
|
+
"bumpp": "^9.2.0",
|
|
93
|
+
"eslint": "^8.49.0",
|
|
94
94
|
"luxon": "^3.3.0",
|
|
95
95
|
"nuxt": "^3.6.5",
|
|
96
96
|
"sass": "^1.63.6",
|
|
97
|
-
"typescript": "^5.
|
|
97
|
+
"typescript": "^5.2.2",
|
|
98
98
|
"vite": "^4.3.9",
|
|
99
99
|
"vitest": "^0.31.4"
|
|
100
100
|
},
|