mheru
mheru

Reputation: 21

node-sass compiler not compiling scss file starting with underscore

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

Upvotes: 0

Views: 1295

Answers (1)

Rachel Nicolas
Rachel Nicolas

Reputation: 1155

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';

Upvotes: 1

Related Questions