From fc30ef1c8c2e3cc6766225dd1cb4921341657342 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 17 Dec 2018 13:42:10 -0800 Subject: [PATCH] fix: add perf budgets to webpack, shorten chunk names (#831) --- webpack/client.config.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webpack/client.config.js b/webpack/client.config.js index 99042fb..723b3ec 100644 --- a/webpack/client.config.js +++ b/webpack/client.config.js @@ -41,7 +41,8 @@ module.exports = { chunks: 'async', minSize: 5000, maxAsyncRequests: Infinity, - maxInitialRequests: Infinity + maxInitialRequests: Infinity, + name: false // these chunk names can be annoyingly long } }, plugins: [ @@ -77,5 +78,8 @@ module.exports = { logLevel: 'silent' // do not bother Webpacker, who runs with --json and parses stdout }) ]), - devtool: dev ? 'inline-source-map' : 'source-map' + devtool: dev ? 'inline-source-map' : 'source-map', + performance: { + hints: dev ? false : 'error' // fail if we exceed the default performance budgets + } }