linkedin / opticss

A CSS Optimizer
BSD 2-Clause "Simplified" License
715 stars 24 forks source link

Code Splitting #39

Open chriseppstein opened 5 years ago

chriseppstein commented 5 years ago

Once OptiCSS runs on an analysis, the styles can be split by using subsets of the analysis to produce a base stylesheet for styles shared across code splits or styles that weren't enumerated as a part of a code split. Styles specific to each code split will be extracted to a split css file.

TBD: rewrite data may still be centralized, or it might be split-able as well.

Note: With declaration merging enabled, the benefits of code-splitting may not result in enough savings to warrant the extra complexity.