I'm new to Bootstrap and SASS, so I'm hoping to get some info on how to configure it correctly and get started.
I have a (relatively) new Angular project created in Visual Studio 2019. Bootstrap is defined in package.json as follows:
"bootstrap": "^4.4.1",
so I was under the impression that I'll get the SASS stuff out of the box. Whenever I generate a component with "ng generate", a SASS file is also created, but when I try adding a simple class to the file, like so:
.nav-link {
width: 40px;
height: 40px;
}
it's not recognized and I get the following error:
Failed to compile.
Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Expected newline.
... primary-nav\primary-nav.component.sass 1:11 root stylesheet
I realize that I'm missing configurations (?), and also - I'm confused as to what I'm supposed to use? SASS extension files? SCSS extension? Isn't SCSS just a "syntax to use SASS"?
I tried searching for similar questions/articles but didn't find a comprehensive explanation on how to get started and configure everything in this type of project.
any help (and/or pointing in the right direction) will be greatly appreciated. thank you!
EDIT - solution(s):
- needed to install
npm i node-sass
- in angular.json had to change this:
"schematics": {
"@schematics/angular:component": {
...
"style": "sass"
},
to this:
"style": "scss"
- changed extension of existing file(s) to
.scss