【问题标题】:How to use PostCSS in angular cli如何在 Angular cli 中使用 PostCSS
【发布时间】:2020-10-05 18:07:12
【问题描述】:

我正在使用 Angular 4 开始一个新项目,我想与 PostCss 集成以使用模块,例如:Autoprefixer、CSSNext 和其他模块。

【问题讨论】:

    标签: angular postcss


    【解决方案1】:

    你可以试试这个https://github.com/angular/angular-cli/issues/1512#issuecomment-254262959 但我需要说一下我以前没用过的东西。

    如果你不使用 CLI,那么可以尝试在 webpack 配置中设置选项以从 scss 构建 css 代码,例如。只需将 require() 用于您的样式文件。在此处阅读更多信息(在通知栏中)https://angular.io/docs/ts/latest/guide/component-styles.html#!#style-urls-in-metadata

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-09-07
      • 2020-11-26
      • 1970-01-01
      • 2020-07-11
      • 1970-01-01
      • 2017-06-24
      • 2018-05-08
      • 2023-03-26
      相关资源
      最近更新 更多