Update v10 to allow use node-sass@9
vadymBalitskyi opened this issue · comments
Add possibility to use node-sass@9 in v10
We would really like this possibility as well. We can't upgrade past sass-loader
version 10.x at the moment because we're still using Webpack 4 (newer versions of sass-loader
requires Webpack 5). But to get proper support for Node.js 20, we need to upgrade to node-sass
version 9.
When checking the release notes for node-sass
version 9, there's no breaking changes that would hinder sass-loader
from allowing this version to be used (only breaking change is dropped support for Node.js 14).
Supported, thank you for the issue
Hello @alexander-akait,
I see that https://github.com/webpack-contrib/sass-loader/releases/tag/v10.5.0 supports node-sass@9
.
However, an error is emitted during build:
Node Sass version 9.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0.
Looks like the error comes from here: https://github.com/webpack-contrib/sass-loader/blob/v10/src/utils.js?
if (
!semver.satisfies(
version,
"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
)
) {
loaderContext.emitError(
new Error(
`Node Sass version ${version} is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0.`
)
);
}
Do we need to update this to include ^9.0.0
?
Thanks.