vuetify-nuxt-module 0.5.6 → 0.5.7
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 +6 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +18 -5
- package/package.json +1 -1
package/dist/module.d.ts
CHANGED
|
@@ -195,6 +195,12 @@ interface MOptions {
|
|
|
195
195
|
styles?: true | 'none' | 'expose' | 'sass' | {
|
|
196
196
|
configFile: string;
|
|
197
197
|
};
|
|
198
|
+
/**
|
|
199
|
+
* Add Vuetify Vite Plugin `transformAssetsUrls`?
|
|
200
|
+
*
|
|
201
|
+
* @default false
|
|
202
|
+
*/
|
|
203
|
+
includeTransformAssetsUrls?: boolean;
|
|
198
204
|
}
|
|
199
205
|
interface ModuleOptions {
|
|
200
206
|
moduleOptions?: MOptions;
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,11 +7,11 @@ import { createConfigLoader } from 'unconfig';
|
|
|
7
7
|
import { readFile, utimes } from 'node:fs/promises';
|
|
8
8
|
import { isPackageExists } from 'local-pkg';
|
|
9
9
|
import { resolveVuetifyBase, normalizePath, writeStyles, cacheDir } from '@vuetify/loader-shared';
|
|
10
|
-
import vuetify from 'vite-plugin-vuetify';
|
|
10
|
+
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';
|
|
11
11
|
import { isAbsolute, join, relative } from 'pathe';
|
|
12
12
|
import { normalizePath as normalizePath$1 } from 'vite';
|
|
13
13
|
|
|
14
|
-
const version = "0.5.
|
|
14
|
+
const version = "0.5.7";
|
|
15
15
|
|
|
16
16
|
const VIRTUAL_VUETIFY_CONFIGURATION = "virtual:vuetify-configuration";
|
|
17
17
|
const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_CONFIGURATION.slice("virtual:".length)}`;
|
|
@@ -363,7 +363,7 @@ async function load(options, nuxt, ctx) {
|
|
|
363
363
|
ctx.dateAdapter = adapter;
|
|
364
364
|
} else {
|
|
365
365
|
if (date.find((d) => d === adapter) === void 0)
|
|
366
|
-
ctx.logger.warn(`Ignoring Vuetify Date configuration, date adapter "@date-io/${adapter}" not installed!`);
|
|
366
|
+
ctx.logger.warn(`[vuetify-nuxt-module] Ignoring Vuetify Date configuration, date adapter "@date-io/${adapter}" not installed!`);
|
|
367
367
|
else
|
|
368
368
|
ctx.dateAdapter = adapter;
|
|
369
369
|
}
|
|
@@ -1023,8 +1023,13 @@ function toKebabCase(str = "") {
|
|
|
1023
1023
|
toKebabCase.cache = /* @__PURE__ */ new Map();
|
|
1024
1024
|
|
|
1025
1025
|
function configureNuxt(configKey, nuxt, ctx) {
|
|
1026
|
-
var _a;
|
|
1027
|
-
const {
|
|
1026
|
+
var _a, _b, _c;
|
|
1027
|
+
const {
|
|
1028
|
+
importComposables,
|
|
1029
|
+
prefixComposables,
|
|
1030
|
+
styles,
|
|
1031
|
+
includeTransformAssetsUrls = false
|
|
1032
|
+
} = ctx.moduleOptions;
|
|
1028
1033
|
const runtimeDir = ctx.resolver.resolve("./runtime");
|
|
1029
1034
|
nuxt.options.build.transpile.push(configKey);
|
|
1030
1035
|
nuxt.options.build.transpile.push(runtimeDir);
|
|
@@ -1035,6 +1040,14 @@ function configureNuxt(configKey, nuxt, ctx) {
|
|
|
1035
1040
|
nuxt.options.css.unshift("vuetify/styles");
|
|
1036
1041
|
else if (typeof styles === "object" && typeof styles?.configFile === "string")
|
|
1037
1042
|
nuxt.options.css.unshift(styles.configFile);
|
|
1043
|
+
if (includeTransformAssetsUrls) {
|
|
1044
|
+
(_b = nuxt.options.vite).vue ?? (_b.vue = {});
|
|
1045
|
+
(_c = nuxt.options.vite.vue).template ?? (_c.template = {});
|
|
1046
|
+
if (typeof nuxt.options.vite.vue.template.transformAssetUrls === "undefined")
|
|
1047
|
+
nuxt.options.vite.vue.template.transformAssetUrls = transformAssetUrls;
|
|
1048
|
+
else
|
|
1049
|
+
ctx.logger.warn("[vuetify-nuxt-module] `includeTransformAssetsUrls` is enabled but `vite.vue.template.transformAssetUrls` is already configured, ignored!");
|
|
1050
|
+
}
|
|
1038
1051
|
extendWebpackConfig(() => {
|
|
1039
1052
|
throw new Error("Webpack is not supported: vuetify-nuxt-module module can only be used with Vite!");
|
|
1040
1053
|
});
|