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
1 changed files with 6 additions and 2 deletions

View File

@ -41,7 +41,8 @@ module.exports = {
chunks: 'async', chunks: 'async',
minSize: 5000, minSize: 5000,
maxAsyncRequests: Infinity, maxAsyncRequests: Infinity,
maxInitialRequests: Infinity maxInitialRequests: Infinity,
name: false // these chunk names can be annoyingly long
} }
}, },
plugins: [ plugins: [
@ -77,5 +78,8 @@ module.exports = {
logLevel: 'silent' // do not bother Webpacker, who runs with --json and parses stdout 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
}
} }