Reputation: 101
I want .scss files to get generated when i create new components through angular cli, but i am get .css files. Tried adding defaults
"defaults": {
"styleExt": "scss",
}
in angular.json but it did not work. I am working on latest version i.e Angular 6. Anyone knows how to get this ?
Upvotes: 6
Views: 4159
Reputation: 2765
It's not like previous versions,
"defaults": {
"styleExt": "scss",
}
You need to replace the above lines with below code.
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
}
You can easily set the style while creating the project with below code.
ng new project_name --style=scss
Upvotes: 13