Skip to content

Commit

Permalink
Merge pull request #1235 from preactjs/fix-firefox-preloading
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Jun 29, 2020
2 parents c97cd66 + 96dad6e commit cf2caec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/cli/lib/lib/webpack/webpack-client-config.js
Expand Up @@ -276,7 +276,7 @@ function isProd(config) {
if (config['inline-css']) {
prodConfig.plugins.push(
new CrittersPlugin({
preload: 'swap',
preload: 'media',
pruneSource: false,
logLevel: 'silent',
additionalStylesheets: ['*.css'],
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/tests/images/build.js
Expand Up @@ -67,7 +67,7 @@ exports.prerender.heads.home = `
<link rel="apple-touch-icon" href=\\"\\/assets\\/icons\\/apple-touch-icon\\.png\\">
<link rel="manifest" href="\\/manifest\\.json">
<style>html{padding:0}<\\/style>
<link href=\\"/bundle.\\w{5}.css\\" rel=\\"preload\\" as=\\"style\\" onload=\\"this.rel='stylesheet'\\">
<link href=\\"/bundle.\\w{5}.css\\" rel=\\"stylesheet\\" media=\\"only x\\" onload=\\"this.media='all'\\">
<noscript>
<link rel=\\"stylesheet\\" href=\\"\\/bundle.\\w{5}.css\\">
</noscript>
Expand All @@ -84,7 +84,7 @@ exports.prerender.heads.route66 = `
<link rel="apple-touch-icon" href=\\"\\/assets\\/icons\\/apple-touch-icon\\.png\\">
<link rel="manifest" href="\\/manifest\\.json">
<style>html{padding:0}<\\/style>
<link href=\\"/bundle.\\w{5}.css\\" rel=\\"preload\\" as=\\"style\\" onload=\\"this.rel='stylesheet'\\">
<link href=\\"/bundle.\\w{5}.css\\" rel=\\"stylesheet\\" media=\\"only x\\" onload=\\"this.media='all'\\">
<noscript>
<link rel=\\"stylesheet\\" href=\\"\\/bundle.\\w{5}.css\\">
</noscript>
Expand All @@ -101,7 +101,7 @@ exports.prerender.heads.custom = `
<link rel="apple-touch-icon" href=\\"\\/assets\\/icons\\/apple-touch-icon\\.png\\">
<link rel="manifest" href="\\/manifest\\.json">
<style>html{padding:0}<\\/style>
<link href=\\"/bundle.\\w{5}.css\\" rel=\\"preload\\" as=\\"style\\" onload=\\"this.rel='stylesheet'\\">
<link href=\\"/bundle.\\w{5}.css\\" rel=\\"stylesheet\\" media=\\"only x\\" onload=\\"this.media='all'\\">
<noscript>
<link rel=\\"stylesheet\\" href=\\"\\/bundle.\\w{5}.css\\">
</noscript>
Expand All @@ -123,7 +123,7 @@ exports.preload.head = `
<link rel=\\"preload\\" href=\\"\\/route-home\\.chunk\\.\\w{5}\\.js\\" as=\\"script\\">
<link rel=\\"preload\\" href=\\"\\/route-home\\.chunk\\.\\w{5}\\.css\\" as=\\"style\\">
<style>html{padding:0}<\\/style>
<link href=\\"\\/bundle\\.\\w{5}\\.css\\" rel=\\"preload\\" as=\\"style\\" onload=\\"this.rel='stylesheet'\\">
<link href=\\"\\/bundle\\.\\w{5}\\.css\\" rel=\\"stylesheet\\" media=\\"only x\\" onload=\\"this.media='all'\\">
<noscript>
<link rel=\\"stylesheet\\" href=\\"\\/bundle.\\w{5}.css\\">
</noscript>
Expand Down

0 comments on commit cf2caec

Please sign in to comment.