Couldn't find preset "es2015" relative to directory问题解决
Couldn't find preset "es2015" relative to directory问题解决
由于是菜鸟没使用ES标准,而引入的vue-ueditor使用了ES标准,所以编译会报错,解决办法如下:
npm install babel-preset-es2015 --save-dev
然后需要在webpack.base.conf.js文件中加入如下代码
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['es2015']
}
}
]
}