Vue.prototype找不到
if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (_vue2.default.prototype.$isServer || typeof document.childNodes !== 'function')) {
exports.isFunction = isFunction = function isFunction(obj) {
return typeof obj === 'function' || false;
};
}
报错:报Uncaught TypeError: Cannot read properties of undefined (reading ‘prototype’)。
vue版本2.x已正确安装
解决方案
打开路由懒加载,在.env.development文件(没有就新建)中添加
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true