0

I am about starting a react application which I want to implement sass as my css preprocessor, all the resources I have consulted are all referring me to still using the default App.css file to just renaming it to App.scss. but my issue is I don't want to use the default I want to set up my own sass files in a different directory within my root directory.

1 Answer 1

1

So you can start in any directory you would want to, but make sure that you're bundling with in your root <Component /> in the case of a create-react-app generated app you could import your root SASS file in the <App /> or index.js. You will be able to bundle your sass this way.

Sign up to request clarification or add additional context in comments.

2 Comments

yeah thanks for this, this works! but what of if I want it to compile to a CSS file within my app so I can just bundle that CSS file to my root component, cos I really don't want my styling to look like an internal styling after compilation (as that is the result of bundling a sass file to a component directly) ??
Hmmm, I honestly don't get what you mean though. Could you explain why you'd need it to compile to CSS? you could eject your webpack config and then update it to how you see fit. Which I think will be a pain in the ass.. honestly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.