<%=compilation.assets[htmlWebpackPlugin.files.chunks.index.entry.substr(htmlWebpackPlugin.files.publicPath.length)].source() %>我的要chunks指定有main才行,不然就报错
new htmlWebpackPlugin({ filename:"a.html",
template:"index.html",
title:"this is page a",
chunks:["a","main"], }),
new htmlWebpackPlugin({ filename:"a.html",
template:"index.html",
title:"this is page a",
chunks:["a","main"], }),
2017-02-22
Conflict: Multiple assets emit to the same filename bundle.js
翻阅了官方文档 找到原因了
module.exports= {
entry: {
main: './src/script/main.js',
a: ['./src/script/a.js', './src/script/b.js'],
},
output: {
path: './dist/js',
filename: '[name].js', //视频中此处 改成这个
}
}
翻阅了官方文档 找到原因了
module.exports= {
entry: {
main: './src/script/main.js',
a: ['./src/script/a.js', './src/script/b.js'],
},
output: {
path: './dist/js',
filename: '[name].js', //视频中此处 改成这个
}
}
2017-02-21
我这也是这个
ERROR in chunk a [entry]
bundle.js
Conflict: Multiple assets emit to the same filename bundle.js
ERROR in chunk a [entry]
bundle.js
Conflict: Multiple assets emit to the same filename bundle.js
2017-02-21
运行webpack hello.js hello.bundle.js --module-bind 'css=style-loader!css-loader 会报错
2017-02-21