mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 01:37:26 +00:00
Add option to make async leave a rel="preload" in the header and append a <link rel="stylesheet"> to the end of body.
This commit is contained in:
@@ -177,8 +177,10 @@ module.exports = function(_, env) {
|
||||
isProd && new PreloadWebpackPlugin(),
|
||||
|
||||
isProd && new CrittersPlugin({
|
||||
// convert critical'd <link rel="stylesheet"> to <link rel="preload" as="style" onload="this.rel='stylesheet'">
|
||||
async: true
|
||||
// convert critical'd <link rel="stylesheet"> to <link rel="preload" as="style">:
|
||||
async: true,
|
||||
// copy original <link rel="stylesheet"> to the end of <body>:
|
||||
preload: true
|
||||
}),
|
||||
|
||||
// Inline constants during build, so they can be folded by UglifyJS.
|
||||
|
||||
Reference in New Issue
Block a user