vue项目中出现window is not defined报错 解决方法:在webpack.base.config.js下的output中添加一条globalObject: 'this' 参考链接:vue项目中出现window is not defined报错