Skip to content

Commit

Permalink
Looks like the preload pushes a layout earlier into idle time while l…
Browse files Browse the repository at this point in the history
…oading, which seems to get us interactive and loaded around 100ms faster.
  • Loading branch information
developit committed Nov 4, 2018
1 parent ceeda4d commit 324847d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ module.exports = function (_, env) {

// Inline Critical CSS (for the intro screen, essentially)
isProd && new CrittersPlugin({
// use <link rel="stylesheet" media="not x" onload="this.media='all'"> hack to load async css:
preload: 'media',
// inline all styles from any stylesheet below this size:
inlineThreshold: 2000,
// don't bother lazy-loading non-critical stylesheets below this size, just inline the non-critical styles too:
Expand Down

0 comments on commit 324847d

Please sign in to comment.