vuetify-nuxt-module 0.16.1 → 0.17.0

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.mts CHANGED
@@ -247,6 +247,20 @@ interface MOptions {
247
247
  styles?: true | 'none' | 'sass' | {
248
248
  configFile: string;
249
249
  };
250
+ /**
251
+ * Disable the modern SASS compiler and API.
252
+ *
253
+ * The module will check for `sass-embedded` dev dependency:
254
+ * - if `disableModernSassCompiler` is enabled, the module will configure the legacy SASS compiler.
255
+ * - if `sass-embedded` dependency is installed, the module will configure the modern SASS compiler.
256
+ * - otherwise, the module will configure the modern SASS API and will enable [preprocessorMaxWorkers](https://vitejs.dev/config/shared-options.html#css-preprocessormaxworkers), only if not configured from user land.
257
+ *
258
+ * @https://vitejs.dev/config/shared-options.html#css-preprocessoroptions
259
+ * @see https://vitejs.dev/config/shared-options.html#css-preprocessormaxworkers
260
+ *
261
+ * @default false
262
+ */
263
+ disableModernSassCompiler?: boolean;
250
264
  /**
251
265
  * Add Vuetify Vite Plugin `transformAssetsUrls`?
252
266
  *
package/dist/module.d.ts CHANGED
@@ -247,6 +247,20 @@ interface MOptions {
247
247
  styles?: true | 'none' | 'sass' | {
248
248
  configFile: string;
249
249
  };
250
+ /**
251
+ * Disable the modern SASS compiler and API.
252
+ *
253
+ * The module will check for `sass-embedded` dev dependency:
254
+ * - if `disableModernSassCompiler` is enabled, the module will configure the legacy SASS compiler.
255
+ * - if `sass-embedded` dependency is installed, the module will configure the modern SASS compiler.
256
+ * - otherwise, the module will configure the modern SASS API and will enable [preprocessorMaxWorkers](https://vitejs.dev/config/shared-options.html#css-preprocessormaxworkers), only if not configured from user land.
257
+ *
258
+ * @https://vitejs.dev/config/shared-options.html#css-preprocessoroptions
259
+ * @see https://vitejs.dev/config/shared-options.html#css-preprocessormaxworkers
260
+ *
261
+ * @default false
262
+ */
263
+ disableModernSassCompiler?: boolean;
250
264
  /**
251
265
  * Add Vuetify Vite Plugin `transformAssetsUrls`?
252
266
  *
package/dist/module.json CHANGED
@@ -5,5 +5,9 @@
5
5
  "nuxt": ">=3.9.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "0.16.1"
8
+ "version": "0.17.0",
9
+ "builder": {
10
+ "@nuxt/module-builder": "0.8.3",
11
+ "unbuild": "2.0.0"
12
+ }
9
13
  }
package/dist/module.mjs CHANGED
@@ -14,16 +14,16 @@ import { pathToFileURL } from 'node:url';
14
14
  import { parseQuery, parseURL } from 'ufo';
15
15
  import destr from 'destr';
16
16
 
17
- const version = "0.16.1";
17
+ const version = "0.17.0";
18
18
 
19
19
  const VIRTUAL_VUETIFY_CONFIGURATION = "virtual:vuetify-configuration";
20
- const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_CONFIGURATION.slice("virtual:".length)}`;
20
+ const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `\0${VIRTUAL_VUETIFY_CONFIGURATION}`;
21
21
  const VIRTUAL_VUETIFY_DATE_CONFIGURATION = "virtual:vuetify-date-configuration";
22
- const RESOLVED_VIRTUAL_VUETIFY_DATE_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_DATE_CONFIGURATION.slice("virtual:".length)}`;
22
+ const RESOLVED_VIRTUAL_VUETIFY_DATE_CONFIGURATION = `\0${VIRTUAL_VUETIFY_DATE_CONFIGURATION}`;
23
23
  const VIRTUAL_VUETIFY_ICONS_CONFIGURATION = "virtual:vuetify-icons-configuration";
24
- const RESOLVED_VIRTUAL_VUETIFY_ICONS_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_ICONS_CONFIGURATION.slice("virtual:".length)}`;
24
+ const RESOLVED_VIRTUAL_VUETIFY_ICONS_CONFIGURATION = `\0${VIRTUAL_VUETIFY_ICONS_CONFIGURATION}`;
25
25
  const VIRTUAL_VUETIFY_SSR_CLIENT_HINTS_CONFIGURATION = "virtual:vuetify-ssr-client-hints-configuration";
26
- const RESOLVED_VIRTUAL_VUETIFY_SSR_CLIENT_HINTS_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_SSR_CLIENT_HINTS_CONFIGURATION.slice("virtual:".length)}`;
26
+ const RESOLVED_VIRTUAL_VUETIFY_SSR_CLIENT_HINTS_CONFIGURATION = `\0${VIRTUAL_VUETIFY_SSR_CLIENT_HINTS_CONFIGURATION}`;
27
27
  const RESOLVED_VIRTUAL_MODULES = [
28
28
  RESOLVED_VIRTUAL_VUETIFY_DATE_CONFIGURATION,
29
29
  RESOLVED_VIRTUAL_VUETIFY_ICONS_CONFIGURATION,
@@ -1215,6 +1215,19 @@ function configureVite(configKey, nuxt, ctx) {
1215
1215
  viteInlineConfig.vue.template ??= {};
1216
1216
  viteInlineConfig.vue.template.transformAssetUrls = transformAssetUrls;
1217
1217
  }
1218
+ if (!ctx.moduleOptions.disableModernSassCompiler) {
1219
+ viteInlineConfig.css ??= {};
1220
+ viteInlineConfig.css.preprocessorOptions ??= {};
1221
+ viteInlineConfig.css.preprocessorOptions.sass ??= {};
1222
+ const sassEmbedded = isPackageExists("sass-embedded");
1223
+ if (sassEmbedded) {
1224
+ viteInlineConfig.css.preprocessorOptions.sass.api = "modern-compiler";
1225
+ } else {
1226
+ viteInlineConfig.css.preprocessorOptions.sass.api = "modern";
1227
+ if (!("preprocessorMaxWorkers" in viteInlineConfig.css))
1228
+ viteInlineConfig.css.preprocessorMaxWorkers = true;
1229
+ }
1230
+ }
1218
1231
  const vuetifyImportOptions = {};
1219
1232
  const ignoreDirectives = ctx.moduleOptions.ignoreDirectives;
1220
1233
  if (ignoreDirectives) {
@@ -1378,7 +1391,8 @@ const module = defineNuxtModule({
1378
1391
  moduleOptions: {
1379
1392
  importComposables: true,
1380
1393
  includeTransformAssetsUrls: true,
1381
- styles: true
1394
+ styles: true,
1395
+ disableModernSassCompiler: false
1382
1396
  }
1383
1397
  }),
1384
1398
  async setup(options, nuxt) {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export type DetectedInfoType = 'browser' | 'node' | 'bot-device' | 'bot' | 'react-native';
3
2
  interface DetectedInfo<T extends DetectedInfoType, N extends string, O, V = null> {
4
3
  readonly type: T;
@@ -1,5 +1,5 @@
1
1
  import type { UnwrapNestedRefs } from 'vue';
2
- import type { SSRClientHints } from './types';
2
+ import type { SSRClientHints } from './types.js';
3
3
  import type { Plugin } from '#app';
4
4
  declare const plugin: Plugin<{
5
5
  ssrClientHints: UnwrapNestedRefs<SSRClientHints>;
@@ -1,6 +1,6 @@
1
1
  import { ssrClientHintsConfiguration } from "virtual:vuetify-ssr-client-hints-configuration";
2
2
  import { reactive, ref, watch } from "vue";
3
- import { VuetifyHTTPClientHints } from "./client-hints.mjs";
3
+ import { VuetifyHTTPClientHints } from "./client-hints.js";
4
4
  import { defineNuxtPlugin, useNuxtApp, useState } from "#imports";
5
5
  const plugin = defineNuxtPlugin({
6
6
  name: "vuetify:client-hints:client:plugin",
@@ -1,5 +1,5 @@
1
1
  import type { UnwrapNestedRefs } from 'vue';
2
- import type { SSRClientHints } from './types';
2
+ import type { SSRClientHints } from './types.js';
3
3
  import type { Plugin } from '#app';
4
4
  declare const plugin: Plugin<{
5
5
  ssrClientHints: UnwrapNestedRefs<SSRClientHints>;
@@ -3,8 +3,8 @@ import {
3
3
  ssrClientHintsConfiguration
4
4
  } from "virtual:vuetify-ssr-client-hints-configuration";
5
5
  import { reactive } from "vue";
6
- import { parseUserAgent } from "./detect-browser.mjs";
7
- import { VuetifyHTTPClientHints } from "./client-hints.mjs";
6
+ import { parseUserAgent } from "./detect-browser.js";
7
+ import { VuetifyHTTPClientHints } from "./client-hints.js";
8
8
  import {
9
9
  defineNuxtPlugin,
10
10
  useCookie,
@@ -1,4 +1,4 @@
1
- import { configureDate } from "./date.mjs";
1
+ import { configureDate } from "./date.js";
2
2
  import { defineNuxtPlugin } from "#imports";
3
3
  export default defineNuxtPlugin({
4
4
  name: "vuetify:date:plugin",
@@ -1,4 +1,4 @@
1
- import { configureDate } from "./date.mjs";
1
+ import { configureDate } from "./date.js";
2
2
  import { defineNuxtPlugin } from "#imports";
3
3
  export default defineNuxtPlugin({
4
4
  name: "vuetify:date-i18n:plugin",
@@ -1,4 +1,4 @@
1
- import { createAdapter } from "./i18n.mjs";
1
+ import { createAdapter } from "./i18n.js";
2
2
  import { defineNuxtPlugin } from "#imports";
3
3
  export default defineNuxtPlugin({
4
4
  name: "vuetify:i18n:plugin",
@@ -1,4 +1,4 @@
1
- import { configureIcons } from "./icons.mjs";
1
+ import { configureIcons } from "./icons.js";
2
2
  import { defineNuxtPlugin } from "#imports";
3
3
  export default defineNuxtPlugin({
4
4
  name: "vuetify:icons:plugin",
@@ -1,5 +1,5 @@
1
1
  import type { UnwrapNestedRefs } from 'vue';
2
- import type { SSRClientHints } from './types';
2
+ import type { SSRClientHints } from './types.js';
3
3
  import type { Plugin } from '#app';
4
4
  declare const plugin: Plugin<{
5
5
  ssrClientHints: UnwrapNestedRefs<SSRClientHints>;
package/dist/types.d.mts CHANGED
@@ -1,21 +1,15 @@
1
-
2
- import type { ModuleOptions, ModuleHooks, ModuleRuntimeHooks } from './module.js'
1
+ import type { ModuleHooks, ModuleRuntimeHooks } from './module.js'
3
2
 
4
3
  declare module '#app' {
5
4
  interface RuntimeNuxtHooks extends ModuleRuntimeHooks {}
6
5
  }
7
6
 
8
7
  declare module '@nuxt/schema' {
9
- interface NuxtConfig { ['vuetify']?: Partial<ModuleOptions> }
10
- interface NuxtOptions { ['vuetify']?: ModuleOptions }
11
8
  interface NuxtHooks extends ModuleHooks {}
12
9
  }
13
10
 
14
11
  declare module 'nuxt/schema' {
15
- interface NuxtConfig { ['vuetify']?: Partial<ModuleOptions> }
16
- interface NuxtOptions { ['vuetify']?: ModuleOptions }
17
12
  interface NuxtHooks extends ModuleHooks {}
18
13
  }
19
14
 
20
-
21
- export type { ComponentName, Components, DateAdapter, DateOptions, DirectiveName, Directives, ExternalVuetifyOptions, FontAwesomeSvgIconSet, FontIconSet, IconFontName, IconSetName, IconsOptions, InlineModuleOptions, JSSVGIconSet, LabComponentName, LabComponents, MOptions, ModuleHooks, ModuleOptions, ModuleRuntimeHooks, SSRClientHints, SSRClientHintsConfiguration, UnoCCSMdiIconSet, VOptions, VuetifyLocale, VuetifyModuleOptions, default } from './module.js'
15
+ export { type ComponentName, type Components, type DateAdapter, type DateOptions, type DirectiveName, type Directives, type ExternalVuetifyOptions, type FontAwesomeSvgIconSet, type FontIconSet, type IconFontName, type IconSetName, type IconsOptions, type InlineModuleOptions, type JSSVGIconSet, type LabComponentName, type LabComponents, type MOptions, type ModuleHooks, type ModuleOptions, type ModuleRuntimeHooks, type SSRClientHints, type SSRClientHintsConfiguration, type UnoCCSMdiIconSet, type VOptions, type VuetifyLocale, type VuetifyModuleOptions, default } from './module.js'
package/dist/types.d.ts CHANGED
@@ -1,21 +1,15 @@
1
-
2
- import type { ModuleOptions, ModuleHooks, ModuleRuntimeHooks } from './module'
1
+ import type { ModuleHooks, ModuleRuntimeHooks } from './module'
3
2
 
4
3
  declare module '#app' {
5
4
  interface RuntimeNuxtHooks extends ModuleRuntimeHooks {}
6
5
  }
7
6
 
8
7
  declare module '@nuxt/schema' {
9
- interface NuxtConfig { ['vuetify']?: Partial<ModuleOptions> }
10
- interface NuxtOptions { ['vuetify']?: ModuleOptions }
11
8
  interface NuxtHooks extends ModuleHooks {}
12
9
  }
13
10
 
14
11
  declare module 'nuxt/schema' {
15
- interface NuxtConfig { ['vuetify']?: Partial<ModuleOptions> }
16
- interface NuxtOptions { ['vuetify']?: ModuleOptions }
17
12
  interface NuxtHooks extends ModuleHooks {}
18
13
  }
19
14
 
20
-
21
- export type { ComponentName, Components, DateAdapter, DateOptions, DirectiveName, Directives, ExternalVuetifyOptions, FontAwesomeSvgIconSet, FontIconSet, IconFontName, IconSetName, IconsOptions, InlineModuleOptions, JSSVGIconSet, LabComponentName, LabComponents, MOptions, ModuleHooks, ModuleOptions, ModuleRuntimeHooks, SSRClientHints, SSRClientHintsConfiguration, UnoCCSMdiIconSet, VOptions, VuetifyLocale, VuetifyModuleOptions, default } from './module'
15
+ export { type ComponentName, type Components, type DateAdapter, type DateOptions, type DirectiveName, type Directives, type ExternalVuetifyOptions, type FontAwesomeSvgIconSet, type FontIconSet, type IconFontName, type IconSetName, type IconsOptions, type InlineModuleOptions, type JSSVGIconSet, type LabComponentName, type LabComponents, type MOptions, type ModuleHooks, type ModuleOptions, type ModuleRuntimeHooks, type SSRClientHints, type SSRClientHintsConfiguration, type UnoCCSMdiIconSet, type VOptions, type VuetifyLocale, type VuetifyModuleOptions, default } from './module'
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "vuetify-nuxt-module",
3
3
  "type": "module",
4
- "version": "0.16.1",
5
- "packageManager": "pnpm@9.5.0",
4
+ "version": "0.17.0",
5
+ "packageManager": "pnpm@9.7.1",
6
6
  "description": "Zero-Config Nuxt Module for Vuetify",
7
7
  "author": "userquin <userquin@gmail.com>",
8
8
  "license": "MIT",
@@ -65,46 +65,46 @@
65
65
  "release": "bumpp && npm publish"
66
66
  },
67
67
  "dependencies": {
68
- "@nuxt/kit": "^3.12.3",
68
+ "@nuxt/kit": "^3.12.4",
69
69
  "defu": "^6.1.4",
70
70
  "destr": "^2.0.3",
71
71
  "local-pkg": "^0.5.0",
72
72
  "pathe": "^1.1.2",
73
73
  "perfect-debounce": "^1.0.0",
74
- "ufo": "^1.5.3",
75
- "unconfig": "^0.3.11",
74
+ "ufo": "^1.5.4",
75
+ "unconfig": "^0.5.5",
76
76
  "vite-plugin-vuetify": "^2.0.3",
77
- "vuetify": "^3.6.12"
77
+ "vuetify": "^3.7.0"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@antfu/eslint-config": "^0.43.1",
81
- "@antfu/ni": "^0.21.10",
81
+ "@antfu/ni": "^0.22.4",
82
82
  "@date-io/luxon": "^2.17.0",
83
83
  "@fortawesome/fontawesome-svg-core": "^6.4.2",
84
84
  "@fortawesome/free-solid-svg-icons": "^6.4.2",
85
85
  "@fortawesome/vue-fontawesome": "^3.0.5",
86
- "@iconify-json/carbon": "^1.1.21",
87
- "@iconify-json/mdi": "^1.1.55",
88
- "@mdi/js": "^7.3.67",
86
+ "@iconify-json/carbon": "^1.1.37",
87
+ "@iconify-json/mdi": "^1.1.68",
88
+ "@mdi/js": "^7.4.47",
89
89
  "@nuxt/devtools": "latest",
90
- "@nuxt/module-builder": "^0.5.5",
90
+ "@nuxt/module-builder": "^0.8.3",
91
91
  "@nuxt/schema": "^3.12.3",
92
92
  "@nuxt/test-utils": "^3.13.1",
93
93
  "@nuxtjs/i18n": "^8.0.0",
94
94
  "@parcel/watcher": "^2.3.0",
95
95
  "@types/node": "^18",
96
- "@unocss/nuxt": "^0.58.4",
96
+ "@unocss/nuxt": "^0.62.1",
97
97
  "bumpp": "^9.2.0",
98
98
  "eslint": "^8.54.0",
99
99
  "luxon": "^3.4.3",
100
100
  "nuxt": "^3.10.2",
101
- "publint": "^0.2.5",
102
- "rimraf": "^5.0.5",
103
- "sass": "^1.63.6",
104
- "typescript": "^5.3.3",
101
+ "publint": "^0.2.10",
102
+ "rimraf": "^6.0.1",
103
+ "sass": "^1.77.8",
104
+ "typescript": "^5.5.4",
105
105
  "vite": "^5.0.12",
106
- "vitest": "^1.4.0",
107
- "vue-tsc": "^2.0.26"
106
+ "vitest": "^2.0.5",
107
+ "vue-tsc": "^2.0.29"
108
108
  },
109
109
  "pnpm": {
110
110
  "peerDependencyRules": {
@@ -114,8 +114,8 @@
114
114
  }
115
115
  },
116
116
  "resolutions": {
117
- "@nuxt/kit": "3.12.3",
118
- "vite": "5.3.2",
117
+ "@nuxt/kit": "3.12.4",
118
+ "vite": "5.4.1",
119
119
  "vue": "3.4.31"
120
120
  },
121
121
  "build": {
@@ -142,4 +142,4 @@
142
142
  "installDependencies": false,
143
143
  "startCommand": "node .stackblitz.js && pnpm install && nr prepack && nr dev:prepare && nr dev"
144
144
  }
145
- }
145
+ }
File without changes
File without changes
File without changes