consider to reduce size of final css file?
Hi, thank you for this awesome lib. Yet, the css file contain a lot of unused styles, including those of components that not been used, which result in 100-200k redundant css data in final output.
Is there any plan to purify css in output process?
Hello @lincanli, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue, thank you!
@lincanli if you're using Less/custom theme you can use this workaround for now:
ant-designtheme.less file to the folder and get rid of the import line at the top @import "../node_modules/ng-zorro-antd/ng-zorro-antd.less";components.less file inside the ant-design folder and copy all the imports from node_modules/ng-zorro-antd/components.less file. (make sure to fix the import path for all the components. e.g. @import "./card/style/index.less"; should become @import "../../node_modules/ng-zorro-antd/card/style/index.less";)index.less file inside the ant-design folder and paste there the following imports:@import "../../node_modules/ng-zorro-antd/style/index.less";
@import "./components.less";
@import "./theme.less"; <--- only if you're using a custom theme
index.less file to the styles list in the angular.json file, and remove the one of the theme.less if you have it.components.less file and uncomment its import@LiadIdan but much of the redundant css are in "../../node_modules/ng-zorro-antd/style/index.less" file
Closed by #3234.
Most helpful comment
@lincanli if you're using Less/custom theme you can use this workaround for now:
ant-designtheme.lessfile to the folder and get rid of the import line at the top@import "../node_modules/ng-zorro-antd/ng-zorro-antd.less";components.lessfile inside theant-designfolder and copy all the imports fromnode_modules/ng-zorro-antd/components.lessfile. (make sure to fix the import path for all the components. e.g.@import "./card/style/index.less";should become@import "../../node_modules/ng-zorro-antd/card/style/index.less";)index.lessfile inside theant-designfolder and paste there the following imports:index.lessfile to the styles list in theangular.jsonfile, and remove the one of thetheme.lessif you have it.components.lessfile and uncomment its import