我有这个webpack代码。我正在使用webpack --watch
。
出于某种原因,在保存文件时它可以正常工作并更新捆绑包但有时它不会抛出任何错误......
'use strict';
let webpack = require(`webpack`);
module.exports = {
entry: './app.jsx',
output: {
path: __dirname + '/dist/js',
filename: 'app-bundle.js'
},
plugins: [
// new webpack.optimize.UglifyJsPlugin()
],
module: {
loaders: [
{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
}
]
}
};