I'm currently working on a React project that uses bundle.js/bundle.css, which are linked in the index.html like this:
<script src="/bundle.js"></script>
<link rel="stylesheet" href="/bundle.css" />
Initially, I had my CSS code in the "client/style.css" file, and everything was running smoothly.
Now, I want to switch to using Sass/scss. Here's what I've done so far:
- I installed Dart Sass, which is now in my devDependencies as:
"sass": "^1.32.8"
- I created a "main.scss" file and transferred my CSS code into it.
- In package.json, I added a script to compile the scss into css:
"compile:sass": "sass client/sass/main.scss client/style.comp.css"
- I then ran the script in the command line:
compile:sass
- This process generated two new files next to my "style.css" -> "style.comp.css" and "style.comp.css.map"
While I can see the compiled styles in "style.comp.css", they are not being applied in the browser. Can anyone assist with this issue?