Closed xavierfoucrier closed 2 months ago
Let me know if you need a minimal reproductible test repository to have a look 👀
Will be great, I think the bug on sass
side, need a code to debug
Let's build it, I will share with you asap 😎
Hello @alexander-akait 👋
I just invited you to join a private minimal test repository called sass-loader-issue
.
Shortly: git pull
+ npm i
+ npm run build
= you will see an error in the console.
Let me know if you need further stuff, thanks! 😎
You need to use:
sassOptions: {
loadPaths: ['src/assets/styles'],
},
instead:
sassOptions: {
includePaths: ['src/assets/styles'],
},
due https://github.com/webpack-contrib/sass-loader/releases/tag/v16.0.0
The sass options are different for the legacy (before) and modern APIs. Please look at docs how to migrate to the modern options.
@alexander-akait okay, simple as that! 🔥
Sorry my fault on this, even if I had a look at the migration guide, I did not took attention to includePaths
renamed to loadPaths
.. clearly useless this option renaming, but anyway, it's working ✨
Thanks for having a look! I am keeping the private repository as is for future issue debugging with you or sass team 😎
Hello @alexander-akait 👋
I noticed a weird behavior after ugprading to
sass-loader
16: somepaths
imported with@use
need to be updated to make the build complete properly. If not, some stylesheets can't be found.Basic example with three files:
styles/index.scss
is doing@use 'utils/build'
✅styles/utils/build.scss
is doing@use 'utils/debug
⚠️styles/utils/debug.scss
⚠️ This is not working, relative path are expected instead, like
@use debug
, becausedebug.scss
is just nearbuild.scss
May be it's now supposed to work as is with new modern API. But doing so, I am having some paths that looks like
../../../../utils/build
sometimes... which is clearly not convenient.Here is my
sass-loader
configuration:Let me know if you need a minimal reproductible test repository to have a look 👀