How-to split CSS in different bundles for lazy loading

With the introduction of lazy loading, it’s now possible to split the javascript code in different bundles (main.js / 0.js / 1.js / etc.)

Is there a way to do the same with css?

I would like to have kind of a common.css which contains everything shared by all pages and components and then having one.css for each of them

My actual css is around 700kb, I guess that splitting it would reduce the size of the css to load and therefore speed up a bit my boot time


On the forum I found this question but it remains unanswered How can i lazy load css file or split main.css to load?

On the app-script GitHub I found this old issue but not sure if it’s still the way to follow

I don’t know of any way to do this right now, but it will be done by default in ionic-angular v4.

1 Like

Awesome @pwespi

I’ll wait for v4. I’ll keep this post open till then and will, when tested, mark your answer as the solution :grinning::+1:

I could close that question, v4 introduce this