feat: Allow Spliting the CSS bundle by Media Queries
See original GitHub issueI’m submitting a…
[x ] Feature request
Current behavior
All CSS are bundled in one CSS (with --extract-css tag).
Expected behavior
Laverage a webpack module, to split CSS to multiple bundles like core.css [media-query].css
to generate multiple CSS bundles and load them with
<link rel="[media-query].css" media="[media-query]">
to effective load only those CSS rules that are needed (based on the platform)
What is the motivation / use case for changing the behavior?
Better code splitting - load performance, smaller “rendering gap”.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Using media queries - CSS: Cascading Style Sheets | MDN
Media queries allow you to apply CSS styles depending on a device's general type (such as print vs. screen) or other characteristics such...
Read more >Combine CSS files by using media queries breaks CSS - Drupal
When 'Combine CSS files by using media queries' is turned on, Advagg produces the correct amount of CSS files, but only displays my...
Read more >https://www.presidio.gov/Shared%20Documents/Menu/s...
scss/_root.scss","dist/css/bootstrap.css",". ... scss/_media.scss",". ... n }\n\n // Only add media query if font-size is bigger as the minimum font-size\n ...
Read more >A Practical Guide to CSS Media Queries - Stack Diary
CSS Media queries - @media - allow you to style multiple versions of a single site depending on the type of device on...
Read more >How to split media queries under webpack config?
I had no luck searching for webpack config that can split queries or at least let me manually specify which css entry should...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Component styles has nothing to do with the css bundle, they’re used as JavaScript string and being processed at runtime.
So, this is a pretty valuable feature, since google search now relies on site speed