No config found or get/set have been deprecated in angular 6

后端 未结 2 1468
花落未央
花落未央 2021-01-20 00:14
ng config --global defaults.styleExt=scss

Error: config not found

ng set --global defaults.styleExt=sc         


        
相关标签:
2条回答
  • 2021-01-20 00:32

    For your version you need to do this:

    On terminal install this:

    npm install node-sass
    

    After this you need to rename .css files in your project to .scss and change all the calls of css to scss in your others files.

    0 讨论(0)
  • 2021-01-20 00:43

    ng set --global defaults.styleExt=scss is deprecated since ng6.

    You should use:

    ng config schematics.@schematics/angular:component '{ styleext: "scss"}'
    

    If you want to target a specific project (replace {project} with your project's name):

    ng config projects.{project}.schematics.@schematics/angular:component '{ styleext: "scss"}'
    
    0 讨论(0)
提交回复
热议问题