Angular CLI:从现有项目生成SASS项目 [英] Angular CLI: generate SASS project from existing project

查看:56
本文介绍了Angular CLI:从现有项目生成SASS项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始研究Angular CLI生成的项目,并且意识到我忘记了--style=sass标志. 有什么方法可以转换我的项目以通过Angular CLI启用SASS?

I've began working on an Angular CLI generated project and realized I forgot the --style=sassflag. Is there any way to convert my project to enable SASS with the Angular CLI?

推荐答案

您可以在现有项目上设置默认样式

you can set the default style on an existing project

ng set defaults.styleExt scss

并在angular-cli.json文件中将 style.css 更改为 style.scss

and in angular-cli.json file change style.css to style.scss

"apps":[{
  "styles":[
     "styles.scss"
   ]
}]

这篇关于Angular CLI:从现有项目生成SASS项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆