我是一个Webpack新手,想了解所有相关知识。我在运行Webpack时告诉我:
ERROR in chunk html [entry]
app.js
Conflict: Multiple assets emit to the same filename app.js
我应该怎么做才能避免冲突?
这是我的webpack.config.js:
module.exports = {
context: __dirname + "/app",
entry: {
'javascript': "./js/app.js",
'html': "./index.html",
},
output: {
path: __dirname + "/dist",
filename: "app.js",
},
resolve: {
extensions: ['.js', '.jsx', '.json']
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ["babel-loader"]
},
{
test: /\.html$/,
loader: "file-loader?name=[name].[ext]",
}
]
}
};