There's more...
When working with large Sass frameworks such as Bootstrap, it's easy to simply add them to the top of your /src/styles.scss file to get started. However, to get the best potential build performance, it's better to import your vendor styles through a separate vendor.scss file. This allows the Angular-CLI build to limit the regeneration of its stylesheets when you rebuild to only what has changed. This is because of a tree-shaking optimization built into Angular-CLI's WebPack build system that doesn't recompute unchanged branches of content. By separating your library styles such as Bootstrap from your own custom Sass styles, Angular-CLI will only recompile the part that has changed. Simply move all your bootstrap imports and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access