项目启动报错:Uncaught TypeError: self.postMessage is not a function
vue项目启动报错:Uncaught TypeError: self.postMessage is not a function解决方法:在依赖包(node_modules)中找到webpack-dev-server\client\index.js 将(一般在67行左右)if (typeof self !== 'undefined' && (typeof WorkerGlobalS
·
项目启动报错:Uncaught TypeError: self.postMessage is not a function
解决方法:
在依赖包(node_modules)中找到webpack-dev-server\client\index.js 将(一般在67行左右)
if (typeof self !== 'undefined' && (typeof WorkerGlobalScope === 'undefined'
|| !(self instanceof WorkerGlobalScope))) {
修改为:
// An highlighted block
if (typeof self !== 'undefined' && (typeof WorkerGlobalScope === 'undefined'
|| !(self instanceof WorkerGlobalScope)) && typeof self === 'function') {
后重启项目,完美解决
采坑不易,希望支持
更多推荐
已为社区贡献1条内容
所有评论(0)