我是Angular的新手,我来自Ember社区.尝试使用基于Ember-CLI的新Angular-CLI.
我需要知道在新的Angular项目中处理SASS的最佳方法.我尝试使用ember-cli-sassrepo来查看它是否会发挥作用,因为Angular-CLI的许多核心组件都是使用Ember-CLI模块运行的.
它没有用,但又不确定我是否只是错误配置了一些东西.
另外,在新的Angular项目中组织样式的最佳方法是什么?将sass文件放在与组件相同的文件夹中会很不错.
我已经阅读了文档,其中说如果我想使用,scss我必须运行以下命令:
ng set defaults.styleExt scss
Run Code Online (Sandbox Code Playgroud)
但是,当我这样做并生成该文件时,我仍然在我的控制台中收到此错误:
ng set defaults.styleExt scss
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
对于Angular 8到9的更新,我是按照官方文档进行升级的。
这建议首先更新到最新版本的 Angular 8,例如:
ng update @angular/core@8 @angular/cli@8
但是,我收到三个警告(全部相同):
npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"12.16.1","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN ngx-multi-window@0.3.2 requires a peer of @angular/common@^6.0.0-rc.0 || ^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-multi-window@0.3.2 requires …Run Code Online (Sandbox Code Playgroud)