test: csp, maxChunkSize and ignore generateConfig

This commit is contained in:
Clark Du 2018-01-27 23:48:42 +08:00
parent 833f23ca76
commit 6e2b37a7c6
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
2 changed files with 4 additions and 1 deletions

View File

@ -689,7 +689,8 @@ module.exports = class Builder {
await this.webpackDevMiddleware.close()
}
async generateConfig() {
// TODO: remove ignore when generateConfig enabled again
async generateConfig() /* istanbul ignore next */ {
const config = resolve(this.options.buildDir, 'build.config.js')
const options = _.omit(this.options, Options.unsafeKeys)
await writeFile(

View File

@ -43,6 +43,7 @@ module.exports = {
build: {
stats: false,
publicPath: '/orion/',
maxChunkSize: 300000,
analyze: {
analyzerMode: 'disabled',
generateStatsFile: true
@ -63,6 +64,7 @@ module.exports = {
},
css: [{ src: '~/assets/app.css' }],
render: {
csp: true,
http2: {
push: true,
shouldPush: (file, type) => type === 'script'