Couldnt find preset es2015 relative to directory

搭建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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章