ng g c myComponentName not creating SCSS files but CSS
See original GitHub issueHi!
I am sorry for disturbing. I can’t generate SCSS files using ng g c myComponentName
command.
I know there were an issue opened related to that, but I could not make kit work following the same steps: #158
I created a repo where it can be reproduced: https://github.com/jdavidhermoso/nx-not-generating-scss
These are the steps I followed:
- Create workspace:
npx --ignore-existing create-nx-workspace myorg
- Add capability to create Angular Apps
ng add @nrwl/angular --defaults
- Create Angular App:
ng g @nrwl/angular:application todos
- Setting
styleext
prop toscss
:ng config schematics.@nrwl/schematics:component.styleext scss
- Generate component in the
todos
app:ng g c myComponentName --project=todos
I’m probably making something bad, but I can’t figure out what.
Thanks in advance.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
"ng g c" is not creating scss style extension unless ... - GitHub
Hi, for those who are using Angular 9, this works on my project. On our angular.json file do this: To fix it, open...
Read more >angular cli generate component in library doesn't create scss file
I expected that when I run ng g c footer it would create the component without the test file and with a SCSS...
Read more >How to Structure SCSS in an Angular App - Medium
When creating a new Angular app using the ng new app-name command, ... SCSS files instead of CSS files when you create new...
Read more >ng generate - Angular
Only CSS styles can be included inline. Default is false, meaning that an external styles file is created and referenced in the root...
Read more >Use Single File Components By Default in Angular - Sam Julien
By default, the Angular CLI generates components with separate CSS and template files. If that works for you, great! If you don't like...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Since we moved all the angular functionality into
@nrwl/angular
, you need to change the collection.So instead of
You need to do
The solution is not working for
"@angular/cli": "9.1.0"
https://stackoverflow.com/questions/60225919/after-update-from-angular-8-to-angular-9-ng-generate-component-generates-a-c