Extract critical css file with record in manifest.json
See original GitHub issueHow I can extract critical css without any html process. I want extract critical file with hash in the name and emit this file as asset to webpack and save it to manifest.json
as file
Example:
{
"app.js": "app.0f15f07046d4.js",
"app.css": "app.395ff6e90875.css",
"app.js.map": "app.0f15f07046d4.js.map",
"app.css.map": "app.395ff6e90875.css.map",
"vendor.js": "vendor.61b7598213e7.js",
"vendor.js.map": "vendor.61b7598213e7.js.map",
"critical.css": "critical.g5h32j4k123.css"
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Extract critical CSS - web.dev
Learn how to improve render times with critical CSS technique and how to choose the best tool for your project.
Read more >MiniCssExtractPlugin - webpack
This plugin extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS...
Read more >Extend site information page to generate a manifest.json file
While working on the progressive web app module I came across a W3C draft for a manifest file. This file is used on...
Read more >Webpacker can't find application.css in /app/public/packs ...
Seems to be missing a application.css from the manifest.json file in /app/public/packs/manifest.json. I think my manifest.json is not accurate ...
Read more >Critical CSS with Rails and Webpacker - SprocketsLess Part 1
js and critical.scss which then appear in my manifest.json. I've set extract_css: true in wepbacker.yml. However i never get any files written ...
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
@thescientist13 thx for the answer
@romanlex To build off @anthonygore , I don’t think it’s in the scope of critical either.
My understanding of how critical works is by actually using a headless browser to render your page and then using the resulting rendering to find the HTML that is “above the fold” and determine the needed CSS from that. So in fact, it requires working off an HTML document.
Per their README
Hope that helps!