搭建vue项目将 .babelrc 修改为
{
"presets": [["es2015", { "modules": false }]],
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
报错 Couldn't find preset "es2015" relative to directory
由于没ES标准,而引入的vue-ueditor使用了ES标准
解决办法如下
npm install babel-preset-es2015 --save-dev