fix(webpack): deepClone before calling extendConfig (#4464)

This commit is contained in:
Pooya Parsa 2018-11-30 23:52:53 +03:30 committed by Clark Du
parent a6fed0acbd
commit 06ddfbb77b
2 changed files with 2 additions and 4 deletions

View File

@ -361,9 +361,7 @@ export default class WebpackBaseConfig {
plugins: this.plugins()
}
const extendedConfig = this.extendConfig(config)
// Clone deep avoid leaking config between Client and Server
return cloneDeep(extendedConfig)
return this.extendConfig(cloneDeep(config))
}
}

View File

@ -87,7 +87,7 @@ describe('basic dev', () => {
)
const { cssModules, vue } = loadersOptions
expect(cssModules.localIdentName).toBe('[hash:base64:6]')
expect(vueLoader.options).toBe(vue)
expect(vueLoader.options).toEqual(vue)
})
test('Config: cssnano is at then end of postcss plugins', () => {