Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3b06867

Browse filesBrowse files
authored
fix(mocha): disable SSR optimization for Vue 3 testing (#6097)
Fixes vuejs/vue-loader#1734
1 parent 83773ae commit 3b06867
Copy full SHA for 3b06867

File tree

Expand file treeCollapse file tree

2 files changed

+8
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-6
lines changed

‎packages/@vue/cli-plugin-unit-mocha/index.js

Copy file name to clipboardExpand all lines: packages/@vue/cli-plugin-unit-mocha/index.js
+7-5Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ module.exports = api => {
1212

1313
// when target === 'node', vue-loader will attempt to generate
1414
// SSR-optimized code. We need to turn that off here.
15-
// the `optimizeSSR` option is only available in vue-loader 15
16-
if (!isVue3) {
17-
webpackConfig.module
15+
webpackConfig.module
1816
.rule('vue')
1917
.use('vue-loader')
2018
.tap(options => {
21-
options.optimizeSSR = false
19+
if (isVue3) {
20+
options.isServerBuild = false
21+
} else {
22+
options.optimizeSSR = false
23+
}
24+
2225
return options
2326
})
24-
}
2527
}
2628
})
2729

‎packages/@vue/cli-service/package.json

Copy file name to clipboardExpand all lines: packages/@vue/cli-service/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"thread-loader": "^3.0.0",
7373
"url-loader": "^4.1.1",
7474
"vue-loader": "^15.9.2",
75-
"vue-loader-v16": "npm:vue-loader@^16.0.0-beta.7",
75+
"vue-loader-v16": "npm:vue-loader@^16.1.0",
7676
"vue-style-loader": "^4.1.2",
7777
"webpack": "^4.0.0",
7878
"webpack-bundle-analyzer": "^3.8.0",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.