Skip to content

Commit 5064cf5

Browse files
committed
test: do not assert publicPath mutation during tests
1 parent 1732007 commit 5064cf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@vue/cli-service/lib/Service.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,14 @@ module.exports = class Service {
196196
const target = process.env.VUE_CLI_BUILD_TARGET
197197
const exceptionTargets = ['lib', 'wc', 'wc-async']
198198
if (
199+
!process.env.VUE_CLI_TEST &&
199200
!exceptionTargets.includes(target) &&
200201
config.output.publicPath !== this.projectOptions.baseUrl
201202
) {
202-
error(
203+
throw new Error(
203204
`Do not modify webpack output.publicPath directly. ` +
204205
`Use the "baseUrl" option in vue.config.js instead.`
205206
)
206-
process.exit(1)
207207
}
208208

209209
return config

0 commit comments

Comments
 (0)