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() 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 config = resolve(this.options.buildDir, 'build.config.js')
const options = _.omit(this.options, Options.unsafeKeys) const options = _.omit(this.options, Options.unsafeKeys)
await writeFile( await writeFile(

View File

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