<%=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