Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

angular cli generate component in library doesn't create scss file

Tags:

angular-cli

I created a new library today by running the create project command first:

ng new situ-angular-components --createApplication=false --skipTests=true --prefix=situ --style=scss

Then I created the library:

ng g library situ-angular-components

I expected that when I run ng g c footer it would create the component without the test file and with a SCSS file, but it doesn't:

enter image description here

Does anyone know why?

like image 426
r3plica Avatar asked Dec 02 '25 10:12

r3plica


1 Answers

Open you angular.json and check the schematics/angular:component tree

It should be like this

   "schematics": {
        "@schematics/angular:component": {
          "style": "scss",
          "prefix": "app"
        }
      },
like image 170
HariHaran Avatar answered Dec 05 '25 14:12

HariHaran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!