0
votes

new to web development and bombarded with a lot of jargons and stuffs already, now wondering on how sass works.

I started developing nodejs + electron using electron-forge, i use node-sass to compile .scss files, i tried the command 'node-sass src/css -o src/css' to compile all .scss file and all works fine until i tried to sass compile a .scss file that starts with underscore (i.e. _test1.scss) that isn't being compiled. I tried this because I reached a point where I add bootstrap, jquery, popper, etc. stuffs on my project and started sass compiling using node-sass and i found that files starting on underscore does not compile.

So why is that?

What could be its possible consequences, etc or experiences, thoughts on this?

so far I don't have a problem if those files were not compiled. I just downloaded these so i can have a template i can work on. As long as the main.css file i reference compiles, everything is fine.

enter image description here

1
From the Docs: The underscore lets Sass know that the file is only a partial file and that it should not be generated into a CSS file. Sass partials are used with the @use rule. - Sfili_81

1 Answers

0
votes

You need to import your partials in your main scss file. For example you can create index.scss file somewhere in the directory and import your partials:

@import './base/base';
@import './base/fonts';

and then import this index.scss in your main component for example in App.js:

import '../css/index.scss';