Is it possible to build separate CSS file with angular-cli?

前端 未结 3 947
予麋鹿
予麋鹿 2020-12-16 12:12

By default everything is bundled in:

  • inline.bundle.js
  • polyfills.bundle.js
  • styles.bundle.js
  • vendor.bundle.js
  • main.bundle.js<
3条回答
  •  别那么骄傲
    2020-12-16 12:21

    As @Rob correctly pointed out you can use flag --extract-css. Unfortunately this flag is not possible to use with ng-serve from Angular 6+.

    If you want to extract css in both ng build and ng-serve you can edit angular.json file in below section architect -> build -> options add new option "extractCss": true

提交回复
热议问题