kitze / custom-react-scripts

[DEPRECATED, use customize-cra] Allow custom config for create-react-app without ejecting
https://custom-react-scripts.netlify.com
MIT License
992 stars 96 forks source link

react-toolbox #31

Closed maitriyogin closed 7 years ago

maitriyogin commented 7 years ago

Hi, this isn't a bug as such... I'm trying to get this to work with react-toolbox, which uses both sass and css-modules. my .env

REACT_APP_SASS=true
REACT_APP_LESS=false
REACT_APP_STYLUS=false
REACT_APP_CSS_MODULES=true

This amounts to errors in react-toolboxes imports which suggests that their scss files aren't being compiled :

Error in ./~/react-toolbox/lib/link/theme.scss
Module parse failed: /Users/stephenwhite/Documents/Projects/telenor/cc20/c3m-fe/node_modules/react-toolbox/lib/link/theme.scss Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '@' (1:0)
 @ ./~/react-toolbox/lib/link/index.js 14:13-36

So my question is if I enable sass will it compile all the stuff in node modules or do I need to enable another flag to achieve this? Cheers, Stephen.

kitze commented 7 years ago

@maitriyogin can you please create a repo with the problem so I can try to fix it?

kitze commented 7 years ago

Hey @maitriyogin , the dev of react-toolbox suggests that you should try this method of using it instead -> https://github.com/react-toolbox/react-toolbox-themr

You don't need to customize create-react-app.

Try it and let me know.

maitriyogin commented 7 years ago

Hi, yes sorry I should have closed this a while back. After a thread on RT's issues the docs finally got created and I went over to using their approach. It works great! Apologies for not closing this sooner but work life can be a bit hectic at times. Cheers, Stephen.