You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug is not caused by the space in the path. It reproduces on any Windows path.
styles.configFile is interpolated into an @use rule as a bare Windows path (C:/...).
Dart Sass parses C: as a URL scheme, so the import fails — the space is irrelevant.
The two consumers of the same variable behave differently, which is why this only shows up on
one code path.
Evidence 1 — bare drive-letter paths never resolve
"C:/pirepro/real/proj with space/styles/settings.scss"
❌ Error: Can't find stylesheet to import.
A bare C:/... fails with and without a space. A file:// URL works with and without a space.
This is why the maintainer's suggestion to check a non-Windows OS is the right instinct: on
Linux/macOS resolvePath() returns /home/user/project/styles/settings.scss, and a leading /
is understood by Sass as a filesystem-absolute path. On Windows the leading C: is read as a
scheme instead.
Evidence 2 — the module interpolates the path without converting it
which is exactly the failing form from Evidence 1.
Evidence 3 — the other consumer of the same variable does convert it
The same ctx.stylesConfigFile is passed to @vuetify/unplugin-styles:
// L1129-1137}elseif(typeofstylesOption==="object"&&stylesOption!==null&&"configFile"instylesOption){if(!ctx.stylesConfigFile){thrownewError("vuetify-nuxt-module: styles.configFile could not be resolved");}constcache=resolveStylesCache(stylesOption);viteInlineConfig.plugins.push(Styles({settings: ctx.stylesConfigFile,
...
and @vuetify/unplugin-styles wraps it before building its own @use:
This mirrors what @vuetify/unplugin-styles already does for the same value, keeps both code
paths consistent, and is a no-op on Linux/macOS (a file:// URL resolves identically there).
Notes
The issue title mentions spaces, but any Windows path with styles.configFile set is affected;
the reporter's path merely happened to contain one, which is why the space looked causal.
styles: true / styles: {} do not hit this branch, so only projects that set styles.configFile are affected — likely why this is not more widely reported.
Activity
userquin commentedon Sep 25, 2026
The bug at
@vuetify/unplugin-styles(@AndreyYolkin still private?)userquin commentedon Sep 25, 2026
We need to add a test for this (at unplugin-styles) and check if it works on a non Windows OS (SASS/SCSS)
haigou-web commentedon Oct 5, 2026
vuetifyjs/nuxt-module #396 — Root cause diagnosis
TL;DR
The bug is not caused by the space in the path. It reproduces on any Windows path.
styles.configFileis interpolated into an@userule as a bare Windows path (C:/...).Dart Sass parses
C:as a URL scheme, so the import fails — the space is irrelevant.The two consumers of the same variable behave differently, which is why this only shows up on
one code path.
Evidence 1 — bare drive-letter paths never resolve
Run with
sass-embeddedon Windows:@useURL"file:///C:/pirepro/nospace/styles/settings.scss""file:///C:/pirepro/real/proj%20with%20space/styles/settings.scss""C:/pirepro/nospace/styles/settings.scss"Error: Can't find stylesheet to import."C:/pirepro/real/proj with space/styles/settings.scss"Error: Can't find stylesheet to import.A bare
C:/...fails with and without a space. Afile://URL works with and without a space.This is why the maintainer's suggestion to check a non-Windows OS is the right instinct: on
Linux/macOS
resolvePath()returns/home/user/project/styles/settings.scss, and a leading/is understood by Sass as a filesystem-absolute path. On Windows the leading
C:is read as ascheme instead.
Evidence 2 — the module interpolates the path without converting it
vuetify-nuxt-module@1.0.0-rc.6,dist/module.mjs:The generated
.nuxt/vuetify/vuetify.settings.scsstherefore contains:which is exactly the failing form from Evidence 1.
Evidence 3 — the other consumer of the same variable does convert it
The same
ctx.stylesConfigFileis passed to@vuetify/unplugin-styles:and
@vuetify/unplugin-styleswraps it before building its own@use:So the Vite plugin path works on Windows and the Nuxt template path does not — a single
inconsistency, not a path-content problem.
Suggested fix
pathToFileURLis already imported at the top of the file (L2), it is just not used here:This mirrors what
@vuetify/unplugin-stylesalready does for the same value, keeps both codepaths consistent, and is a no-op on Linux/macOS (a
file://URL resolves identically there).Notes
styles.configFileset is affected;the reporter's path merely happened to contain one, which is why the space looked causal.
styles: true/styles: {}do not hit this branch, so only projects that setstyles.configFileare affected — likely why this is not more widely reported.write: true; this is a separate defect in the same template.Verified on Windows, Node 24.18.0,
sass-embedded1.105.1,vuetify-nuxt-module1.0.0-rc.6.fix: emit a file URL for the styles configFile
fix: encode the apostrophe in the settings `@use` target, and cover t…