mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-25 14:28:15 -05:00
fix(mocha): disable SSR optimization for Vue 3 testing (#6097)
Fixes https://github.com/vuejs/vue-loader/issues/1734
This commit is contained in:
@@ -12,16 +12,18 @@ module.exports = api => {
|
||||
|
||||
// when target === 'node', vue-loader will attempt to generate
|
||||
// SSR-optimized code. We need to turn that off here.
|
||||
// the `optimizeSSR` option is only available in vue-loader 15
|
||||
if (!isVue3) {
|
||||
webpackConfig.module
|
||||
webpackConfig.module
|
||||
.rule('vue')
|
||||
.use('vue-loader')
|
||||
.tap(options => {
|
||||
options.optimizeSSR = false
|
||||
if (isVue3) {
|
||||
options.isServerBuild = false
|
||||
} else {
|
||||
options.optimizeSSR = false
|
||||
}
|
||||
|
||||
return options
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
"webpack-merge": "^4.2.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"vue-loader-v16": "npm:vue-loader@^16.0.0-beta.7"
|
||||
"vue-loader-v16": "npm:vue-loader@^16.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue/compiler-sfc": "^3.0.0-beta.14",
|
||||
|
||||
Reference in New Issue
Block a user