运行vue run serve出现core-js相关错误

1. 安装core-js

npm install core-js

or

npm install core-js@2

2. 在babel.config.json中引入

module.exports = {
  presets: ["@vue/cli-plugin-babel/preset"],
  // 引入这个  
  presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ]
};

  

一个卖酒的伪程序员,酒是生活,代码是梦想!
原文地址:https://www.cnblogs.com/xingfuggz/p/14318312.html