var path = require('path');
module.exports = {
entry: __dirname + '/src/js/main.js',
output: {
path: '/dist/',
filename: 'Es666.js'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: "/node_modules/",
query: {
presets: ['es2015']
}
}
]
},
resolve: {
extensions: ['', '.js', '.css']
}
}
错误提示
resolve: { extensions: ['', '.js', '.css'] }
这里第一个不能为空
那些什麽