File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const fs = require('fs');
16
16
const webpack = require ( 'webpack' ) ;
17
17
const NameAllModulesPlugin = require ( 'name-all-modules-plugin' ) ;
18
18
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
19
+ const ScriptExtHtmlWebpackPlugin = require ( 'script-ext-html-webpack-plugin' ) ;
19
20
const ExtractTextPlugin = require ( 'extract-text-webpack-plugin' ) ;
20
21
const ManifestPlugin = require ( 'webpack-manifest-plugin' ) ;
21
22
const InterpolateHtmlPlugin = require ( 'react-dev-utils/InterpolateHtmlPlugin' ) ;
@@ -322,6 +323,11 @@ module.exports = {
322
323
minifyURLs : true ,
323
324
} ,
324
325
} ) ,
326
+ // This ensures that the browser will load the scripts in parallel,
327
+ // but execute them in the order they appear in the document.
328
+ new ScriptExtHtmlWebpackPlugin ( {
329
+ defaultAttribute : 'defer' ,
330
+ } ) ,
325
331
// Makes some environment variables available to the JS code, for example:
326
332
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
327
333
// It is absolutely essential that NODE_ENV was set to production here.
Original file line number Diff line number Diff line change 53
53
"promise" : " 7.1.1" ,
54
54
"react-dev-utils" : " ^1.0.3" ,
55
55
"react-error-overlay" : " ^1.0.3" ,
56
+ "script-ext-html-webpack-plugin" : " ^1.8.0" ,
56
57
"style-loader" : " 0.17.0" ,
57
58
"sw-precache-webpack-plugin" : " 0.9.1" ,
58
59
"url-loader" : " 0.5.8" ,
You can’t perform that action at this time.
0 commit comments