Closed vorenus181 closed 6 years ago
Please make sure you define schematics in your defaultProject rather than a root, since the new angular cli 6 format allows to define schematics both on the root level and on the project level, when you update angular 5 to angular 6 the update process will put schematics on the root level level, but if you will generate a new project then the schematics will be defined on default project level, althrough it maybe best to support both ways currently only the definitions on project level are supported, follow this format:
"defaultProject": "my-app",
"projects": {
"my-app":{
"schematics": {
"@schematics/angular:component": {
"prefix": "cs",
"styleext": "scss"
},
"@schematics/angular:directive": {
"prefix": "cs"
}
}
}
}
}
Great! It works...
Hi @ivalexa, I'm facing this issue with Angular 8 but the solution you mentioned didn't work for me, here's my config.
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"Anonymous": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
}
}
},
"defaultProject": "Anonymous"
}
and ng v
Angular CLI: 8.3.0-next.1
Node: 10.15.0
OS: win32 x64
Angular: 8.2.1
any thoughts?
@AhmedMKamal add "styleext": "scss"
to "@schematics/angular:component"
i.e. your config should be
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"Anonymous": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss",
"styleext": "scss"
}
}
}
},
"defaultProject": "Anonymous"
}
@rustem-akhatov I'll give it a try tomorrow and confirm if it's working or not.
Scss styles extension is ignored when generating component after update to angulat v6.