DEV Community

Discussion on: node-sass considered harmful

Collapse
 
pazcifier profile image
José Paz

Hey Łukasz, I have been working with node-sass for the past month or so (it was used in a course and it sticked with me since) and I noticed this painfully slow builds...

This alternative looks amazing, but what would I need to change to make my node-sass app compatible with this sass package?

Thanks!

Collapse
 
limal profile image
Łukasz Wolnik • Edited

Hey José,

the idea is to use npm's package resolution so that sass package will act as if it was node-sass. It doesn't require any changes to your current build setup. Whether it's Create React App, Webpack or something else.

You may just want to check where in your package.json file you have node-sass referenced.

If it's in devDependencies then use the line from article:

npm install node-sass@npm:sass -D --legacy-peer-deps
Enter fullscreen mode Exit fullscreen mode

If in dependencies then:

npm install node-sass@npm:sass -S --legacy-peer-deps
Enter fullscreen mode Exit fullscreen mode