vuetify-nuxt-module 0.5.14 → 0.5.15
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.json +1 -1
- package/dist/module.mjs +15 -18
- package/package.json +2 -2
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';
|
|
|
12
12
|
import { isAbsolute, join, relative } from 'pathe';
|
|
13
13
|
import { normalizePath as normalizePath$1 } from 'vite';
|
|
14
14
|
|
|
15
|
-
const version = "0.5.
|
|
15
|
+
const version = "0.5.15";
|
|
16
16
|
|
|
17
17
|
const VIRTUAL_VUETIFY_CONFIGURATION = "virtual:vuetify-configuration";
|
|
18
18
|
const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_CONFIGURATION.slice("virtual:".length)}`;
|
|
@@ -1145,11 +1145,13 @@ function configureVite(configKey, nuxt, ctx) {
|
|
|
1145
1145
|
viteInlineConfig.plugins = viteInlineConfig.plugins || [];
|
|
1146
1146
|
checkVuetifyPlugins(viteInlineConfig);
|
|
1147
1147
|
viteInlineConfig.optimizeDeps = defu(viteInlineConfig.optimizeDeps, { exclude: ["vuetify"] });
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1148
|
+
if (nuxt.options.ssr) {
|
|
1149
|
+
viteInlineConfig.ssr || (viteInlineConfig.ssr = {});
|
|
1150
|
+
viteInlineConfig.ssr.noExternal = [
|
|
1151
|
+
...Array.isArray(viteInlineConfig.ssr.noExternal) ? viteInlineConfig.ssr.noExternal : viteInlineConfig.ssr.noExternal && typeof viteInlineConfig.ssr.noExternal !== "boolean" ? [viteInlineConfig.ssr.noExternal] : [],
|
|
1152
|
+
configKey
|
|
1153
|
+
];
|
|
1154
|
+
}
|
|
1153
1155
|
viteInlineConfig.plugins.push(vuetify({ styles: true, autoImport: true }));
|
|
1154
1156
|
viteInlineConfig.plugins.push(vuetifyStylesPlugin({ styles: ctx.moduleOptions.styles }, ctx.logger));
|
|
1155
1157
|
viteInlineConfig.plugins.push(vuetifyConfigurationPlugin(ctx));
|
|
@@ -1169,8 +1171,10 @@ function configureNuxt(configKey, nuxt, ctx) {
|
|
|
1169
1171
|
includeTransformAssetsUrls = true
|
|
1170
1172
|
} = ctx.moduleOptions;
|
|
1171
1173
|
const runtimeDir = ctx.resolver.resolve("./runtime");
|
|
1172
|
-
nuxt.options.
|
|
1173
|
-
|
|
1174
|
+
if (!nuxt.options.ssr) {
|
|
1175
|
+
nuxt.options.build.transpile.push(configKey);
|
|
1176
|
+
nuxt.options.build.transpile.push(runtimeDir);
|
|
1177
|
+
}
|
|
1174
1178
|
(_a = nuxt.options).css ?? (_a.css = []);
|
|
1175
1179
|
if (typeof styles === "string" && ["sass", "expose"].includes(styles))
|
|
1176
1180
|
nuxt.options.css.unshift("vuetify/styles/main.sass");
|
|
@@ -1178,11 +1182,10 @@ function configureNuxt(configKey, nuxt, ctx) {
|
|
|
1178
1182
|
nuxt.options.css.unshift("vuetify/styles");
|
|
1179
1183
|
else if (typeof styles === "object" && typeof styles?.configFile === "string")
|
|
1180
1184
|
nuxt.options.css.unshift(styles.configFile);
|
|
1181
|
-
if (includeTransformAssetsUrls) {
|
|
1185
|
+
if (includeTransformAssetsUrls && typeof nuxt.options.vite.vue?.template?.transformAssetUrls === "undefined") {
|
|
1182
1186
|
(_b = nuxt.options.vite).vue ?? (_b.vue = {});
|
|
1183
1187
|
(_c = nuxt.options.vite.vue).template ?? (_c.template = {});
|
|
1184
|
-
|
|
1185
|
-
nuxt.options.vite.vue.template.transformAssetUrls = transformAssetUrls;
|
|
1188
|
+
nuxt.options.vite.vue.template.transformAssetUrls = transformAssetUrls;
|
|
1186
1189
|
}
|
|
1187
1190
|
extendWebpackConfig(() => {
|
|
1188
1191
|
throw new Error("Webpack is not supported: vuetify-nuxt-module module can only be used with Vite!");
|
|
@@ -1222,16 +1225,10 @@ function configureNuxt(configKey, nuxt, ctx) {
|
|
|
1222
1225
|
src: ctx.resolver.resolve(runtimeDir, "plugins/vuetify-i18n")
|
|
1223
1226
|
});
|
|
1224
1227
|
}
|
|
1225
|
-
if (nuxt.options.dev) {
|
|
1228
|
+
if (nuxt.options.dev || ctx.dateAdapter) {
|
|
1226
1229
|
addPlugin({
|
|
1227
1230
|
src: ctx.resolver.resolve(runtimeDir, "plugins/vuetify-date")
|
|
1228
1231
|
});
|
|
1229
|
-
} else {
|
|
1230
|
-
if (ctx.dateAdapter) {
|
|
1231
|
-
addPlugin({
|
|
1232
|
-
src: ctx.resolver.resolve(runtimeDir, "plugins/vuetify-date")
|
|
1233
|
-
});
|
|
1234
|
-
}
|
|
1235
1232
|
}
|
|
1236
1233
|
}
|
|
1237
1234
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuetify-nuxt-module",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.15",
|
|
5
5
|
"packageManager": "pnpm@8.9.0",
|
|
6
6
|
"description": "Zero-Config Nuxt Module for Vuetify",
|
|
7
7
|
"author": "userquin <userquin@gmail.com>",
|
|
@@ -128,4 +128,4 @@
|
|
|
128
128
|
"installDependencies": false,
|
|
129
129
|
"startCommand": "node .stackblitz.js && pnpm install && pnpm run dev"
|
|
130
130
|
}
|
|
131
|
-
}
|
|
131
|
+
}
|