参考网络相关资料,解决:
① cnpm install --save-dev babel-plugin-transform-runtime
②修改.babelrc文件,原来: "plugins": ["transform-object-rest-spread", "syntax-dynamic-import"] 一行改为:
"plugins": ["transform-object-rest-spread", "syntax-dynamic-import", ["transform-runtime", {
"helpers": false,
"polyfill": false,
"regenerator": true,
"moduleName": "babel-runtime"
} ]
]
来源:oschina
链接:https://my.oschina.net/jsjapp/blog/4952180