For VUE projects, IE11 is compatible


Step 1: Install [email protected] and regenerator-Runtime

npm install --save core-js@3
npm install --save regenerator-runtime
Copy the code

Step 2: Modify babel.config.js

presets: [
  [
  	"@babel/preset-env", 
  	{
    	useBuiltIns: "entry".// or "usage"
    	corejs: 3.targets: {
           chrome: '59'.ie: '11',}}]]Copy the code

Step 3: Modify the entry file main.js and add it at the top

import "core-js/stable";
import "regenerator-runtime/runtime";
Copy the code