Vue CLI 3-现代模式构建=>浏览器中的错误

时间:2018-10-05 05:30:59

标签: vue.js webpack vue-cli-3

chunk-vendors.60d43f55.js:1 Uncaught TypeError: Cannot read property 'webpackJsonp' of undefined
at chunk-vendors.60d43f55.js:1

=> chunk-vendors.60d43f55.js:1 enter image description here

index.html => enter image description here

没有--modern模式都可以正常工作

1 个答案:

答案 0 :(得分:1)

啊,我在vue.config.js中发现了问题=> 冗余globalObject:'this'

module.exports = {
  ...
  configureWebpack: {
    output: {
      globalObject: 'this'
    }
  }
  ...
}