diff --git a/lib/intermediate-representation-dir/root.js b/lib/intermediate-representation-dir/root.js index 61b22d8cfbf86..464d2eae55461 100644 --- a/lib/intermediate-representation-dir/root.js +++ b/lib/intermediate-representation-dir/root.js @@ -15,7 +15,7 @@ function shouldUpdateScroll (prevRouterProps, { location: { pathname } }) { if (prevRouterProps) { const { location: { pathname: oldPathname } } = prevRouterProps if (oldPathname === pathname) { - return false + return false } } return true diff --git a/lib/utils/webpack.config.js b/lib/utils/webpack.config.js index c293cc34b7ca0..fc10c8bfb54f2 100644 --- a/lib/utils/webpack.config.js +++ b/lib/utils/webpack.config.js @@ -199,7 +199,7 @@ module.exports = (program, directory, suppliedStage, webpackPort = 1500, pages = // of unused code on the initial opening of the app. // // Use Math.max as there must be at least two chunks. - minChunks: Math.max(2, Math.floor(components.length / 2)), + minChunks: Math.max(2, Math.floor(components.length / 3)), }), // Add a few global variables. Set NODE_ENV to production (enables // optimizations for React) and whether prefixing links is enabled @@ -221,21 +221,21 @@ module.exports = (program, directory, suppliedStage, webpackPort = 1500, pages = // rate for commons.js. new ChunkManifestPlugin({ filename: "chunk-manifest.json", - manifestVariable: "webpackManifest" + manifestVariable: "webpackManifest", }), // Minify Javascript. new webpack.optimize.UglifyJsPlugin({ compress: { screw_ie8: true, // React doesn't support IE8 - warnings: false + warnings: false, }, mangle: { - screw_ie8: true + screw_ie8: true, }, output: { comments: false, - screw_ie8: true - } + screw_ie8: true, + }, }), // Ensure module order stays the same. Supposibly fixed in webpack 2.0. new webpack.optimize.OccurenceOrderPlugin(), @@ -276,7 +276,6 @@ module.exports = (program, directory, suppliedStage, webpackPort = 1500, pages = // Hierarchy of directories for Webpack to look for module. // First is the site directory. // Then in the special directory of isomorphic modules Gatsby ships with. - // Then the site's node_modules directory root: [ directory, path.resolve(__dirname, `..`, `isomorphic`),