Start by adding _ to the file you want to ignore ... Done! From the doc:
Partials
If you have a SCSS or Sass file that you want to import but donβt want to compile into a CSS file, you can add an underscore to the beginning of the file name. This will tell Sas not to compile it into a regular CSS file. You can then import these files without using underscores.
For example, you might have _colors.scss. Then the _colors.css file will be created, and you can do
@import "colors";
So adding underscores will do the job. Just do not import.
Be careful when naming your files, because if you have style.scss and _style.scss , Sass will see them as the same file name and cause an error:
>>> Change detected to: /Users/allcaps/test/style.scss WARNING: In /Users/allcaps/test: There are multiple files that match the name "style.scss": _style.scss style.scss
A simple workaround is to add two underscores: __style.scss .
source share