Preload/prefetch JS files techniques to avoid waterfall when you split the main bundle in chunks (async routes).
Approach | JS executed | Loaded as | Support |
---|---|---|---|
link rel preload as script | false | JS File | - |
link rel prefetch | false | File | + |
script async defer in body | true * | JS File | ++ |
script async defer in head | true * | JS File | ++ |
*
On Webpack 2 throws Uncaught ReferenceError: webpackJsonp is not defined
. Not tested on webpack 1 but I guess a similar error.