Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scss solution #654

Open
wingedearth opened this issue Feb 9, 2024 · 1 comment
Open

scss solution #654

wingedearth opened this issue Feb 9, 2024 · 1 comment

Comments

@wingedearth
Copy link

react-app-rewired-scss doesn't appear to be compatible with react-app-rewired v2.2.1. I get a dependency error when attempting to resolve. If I try to force the install of react-app-rewired-scss I get a gyp error.

Does react-app-rewired have a solution for loading SCSS?

@dawnmist
Copy link
Collaborator

There was a major update to webpack from version 4 to version 5 when create-react-app upgraded to react-scripts version 2.0 - all older plugins for react-app-rewired that worked with webpack 4 became incompatible with version 5 of webpack.

I cannot find react-app-rewired-scss, but I can find react-app-rewire-scss - the mod with the name without the "d" on rewire is one of the older webpack 4 mods, so it is not compatible with react-app-rewired version 2+ and not compatible with webpack 5+.

If you're using create-react-app with react-scripts version 2+, scss is supported by create-react-app itself - you don't need react-app-rewired for scss compatibility. See: https://create-react-app.dev/docs/adding-a-sass-stylesheet.

If you're using a very very old version of create-react-app with react-scripts version 1, you'll need to be using react-app-rewired version 1.6 for it to be compatible with the very old version of create-react-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants