gilsdav / ng-afelio

Extended Angular CLI
5 stars 6 forks source link

'ng-afelio styles' should not create only one scss file #13

Closed dboogaerts closed 5 years ago

dboogaerts commented 5 years ago

When ng-afelio styles command is executed, the ui-kit styles.scss is exported in an uniq main.scss in main project. This files contains variables, mixins, classes. When this file is imported in component's scss files for using variables, all classes contained are "scoped" in each component's css. That increase JS files size. (380KB -> 7,2 Mb in my case)

We need separate global classes (Bootstrap, personnal component classes,...) from only scss stuff (variables, mixins, or %'s libs classes). Global classes could be transformed in css files and only include in style's directive into angular.json file.

Thank you

gilsdav commented 5 years ago

Fixed on 1.0.1-6 You need to replace all ~ by ../../../node_modules/ in your _bootstrap-custom.scss