I have just created a new angular project using the Angular CLI for Angualr 4.
I generated it with SCSS so:
ng new myproject --style=sass
It all compiles well until I add some css.
For example I added this to app.component.scss
.test {
padding: 20px;
}
And as soon as I save I get this error:
Failed to compile.
./src/app/app.component.sass
Module build failed:
.test {
^
Invalid CSS after ".test {": expected "}", was "{"
in C:\Users\me\Documents\myproject\src\app\app.component.sass (line 1, column 8)
@ ./src/app/app.component.ts 18:17-48
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
What I'm I doing wrong?
./src/app/app.component.scssinstead of./src/app/app.component.sassng new myproject --style=scssby defining scss not sass