Skip to content

Commit d81d57b

Browse files
authored
fix: fix dev mode compatibility with workers (#4034)
fixes #3539
1 parent d872cc0 commit d81d57b

File tree

1 file changed

+2
-1
lines changed
  • packages/@vue/cli-service/lib/config

1 file changed

+2
-1
lines changed

packages/@vue/cli-service/lib/config/dev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ module.exports = (api, options) => {
1111
.use(require('webpack/lib/HotModuleReplacementPlugin'))
1212

1313
// https://github.com/webpack/webpack/issues/6642
14+
// https://github.com/vuejs/vue-cli/issues/3539
1415
webpackConfig
1516
.output
16-
.globalObject('this')
17+
.globalObject(`(typeof self !== 'undefined' ? self : this)`)
1718

1819
if (!process.env.VUE_CLI_TEST && options.devServer.progress !== false) {
1920
webpackConfig

0 commit comments

Comments
 (0)