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
main.scss has @use "/src/foo/foo.scss" which works, but the same line in another file errors with [plugin:vite:css] [sass] File URL path must be absolute.
It works on v5 and errors on v6.
Tried to add a sass importer to solve the problem in vite config -> css -> preprocessorOptions -> sass -> importers. But it errors before and doesn't reach the importer.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
miguel-leon
changed the title
scss paths starting with / on secondary sass modules stopped working on v6 only on Windows.
scss paths starting with / on secondary sass modules stopped working on v6 only on Windows, can't solve with sass custom importer.
Dec 9, 2024
miguel-leon
changed the title
scss paths starting with / on secondary sass modules stopped working on v6 only on Windows, can't solve with sass custom importer.
scss paths starting with / on secondary sass modules stopped working on v6 only on Windows, can't solve with custom sass importer.
Dec 9, 2024
Describe the bug
main.scss
has@use "/src/foo/foo.scss"
which works, but the same line in another file errors with[plugin:vite:css] [sass] File URL path must be absolute
.It works on v5 and errors on v6.
Tried to add a sass importer to solve the problem in vite config -> css -> preprocessorOptions -> sass -> importers. But it errors before and doesn't reach the importer.
Reproduction
https://stackblitz.com/edit/vitejs-vite-qnqdkutz
Steps to reproduce
Not reproducible in linux, so the stackblitz link does not error.
After
npm create vite
add the following files:The content of
main.scss
The content of
foo.scss
The content of
bar.scss
And to
index.html
add<link rel="stylesheet" href="/src/main.scss" />
Then
npm run dev
.System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: