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

Sass not working #4347

Closed
adamwright104 opened this issue Apr 23, 2018 · 9 comments
Closed

Sass not working #4347

adamwright104 opened this issue Apr 23, 2018 · 9 comments

Comments

@adamwright104
Copy link

Can see that sass was added so tried it on a fresh install by changing the app.css and index.css to scss files. Didn't work. What steps are required to get this working

@gaearon
Copy link
Contributor

gaearon commented Apr 23, 2018

Sass support was added to the 2.x branch which is in alpha testing. You won't get it in a newly created project unless you tell CRA specifically to use the 2.x alphas. Note they have bugs and will have more breaking changes. I suggest you to wait for the official release.

@gaearon gaearon closed this as completed Apr 23, 2018
@adamwright104
Copy link
Author

@gaearon thanks

@gaearon
Copy link
Contributor

gaearon commented Apr 23, 2018

If you do want to try it, the instructions are here: #3815

@philippefutureboy
Copy link

philippefutureboy commented May 15, 2018

Hey!

The docs for the SCSS/SASS support on master suggest that the integration work. Would it be possible to revise the documentation and specify that the SCSS/SASS support is only for version 2.x ?

Have a wonderful day ✨

Cheers,

Philippe

@TifaJ11
Copy link

TifaJ11 commented May 24, 2018

The docs Philippe is referring to was added Feb 2017: https://github.com/facebookincubator/create-react-app/pull/1008/files. This was before the 2.0 change considerations, I assume, and the steps should work with 1.0 versions (?) but I was not able to get it working either.

@philippefutureboy
Copy link

@TifaJ11: Thanks for your answer :) I guess that when a contributor gets time to see this issue, they'll shed a bit more light on the situation.

Have a wonderful day 🚀

Cheers,

Phil

@fev4
Copy link

fev4 commented Jun 1, 2018

Using the 2.0 next version (fresh install) I inteded to use an SCSS + CSS Modules and this happens:

Module build failed: Error: `sass-loader` requires `node-sass` >=4. Please install a compatible version.

Is there something that needs to be done in order to opt-in? How do I opt-in in order to use/test these features?

@bugzpodder
Copy link

@philippefutureboy @TifaJ11 The docs you referred to is indeed for v1.x of create-react-app. I've used these steps before and can confirm they work. If you need assistance considering filing a new issue with proper repo steps.
@fillipvt for 2.x as you said all you need to do is add node-sass in your dependencies and it should just work without doing anything else. If you have follow up questions please open a new issue.

@facebook facebook locked as resolved and limited conversation to collaborators Jun 1, 2018
@gaearon
Copy link
Contributor

gaearon commented Oct 2, 2018

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

No branches or pull requests

6 participants