Open MrChriZ opened 6 years ago
In theory, yes. I'm not exactly sure how though. We have our own app scaffolding tools and so we don't spend much time with CRA at Revelry. I'd welcome a PR from anyone who wants to try this and can contribute docs to guide others.
👋 It's actually possible to use Harmonium's Sass without sassy-npm-importer
.
First, follow the instructions to enable Sass within in Create React App:
Now you can rename
src/App.css
to src/App.scss
and updatesrc/App.js
to importsrc/App.scss
. This file and any other file will be automatically compiled if imported with the extension.scss
or.sass
.
Then, install Harmonium (if you haven't already)
npm i harmonium --save
Next, add the import to your App.scss
@import "~harmonium/scss/app";
Now, kick off CRA w/ HMR:
npm run start
Cheers! 🍻
Is there a way to use this with a react CRA App? I've used this technique https://medium.com/@Connorelsea/using-sass-with-create-react-app-7125d6913760 to use Node-Sass.