in my .angular-cli.json, the styles property like this:
"styles": [
"styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"adminlte.css",
"../node_modules/admin-lte/dist/css/skins/skin-yellow-light.min.css"
],
I expect these files will bundle in that order, but I got the styles.bundle.css like this:
AdminLTE ...... styles ...... skin-yellow-light ...... bootstrap ......
This lead to my project's style are different from dev mode after I build it. So I wonder why.
I solved this problem by @import all the style files into styles.css, so my angular-cli.json:
"styles": [
"styles.css"
]
and styles.css:
/* import other style files */
@import "./styles/bootstrap.min.css";
@import './styles/adminlte.css';
@import './styles/skin-yellow-light.min.css';
/* some global styles */
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With