how to include sass file in reactjs

NAVEED picture NAVEED · Sep 19, 2018 · Viewed 23.6k times · Source

I use browserify to transform my code now getting error while the sass files were getting imported

@import parse error

Can any one help me to sort this issue how to use and integrate

Answer

Karim picture Karim · Jan 12, 2019

With the latest version of create-react-app you don't have to eject your react app to add sass support.

Just add node-sass to your project:

NPM: npm install node-sass --save

YARN yarn add node-sass

And now you can import sass files in your react components. Check the official documentation here