fix: add perf budgets to webpack, shorten chunk names (#831)

This commit is contained in:
Nolan Lawson 2018-12-17 13:42:10 -08:00 committed by GitHub
parent 669be2e32b
commit fc30ef1c8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}
}