<%=compilation.assets[htmlWebpackPlugin.files.chunks.index.entry.substr(htmlWebpackPlugin.files.publicPath.length)].source() %>我的要chunks指定有main才行,不然就報(bào)錯(cuò)
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
謝謝老師,希望老師早點(diǎn)更新webpack下,希望多講點(diǎn)vue+webpack開(kāi)發(fā)相關(guān)的內(nèi)容。
2017-02-21
講師回答 / qbaty
是不是template 中的錯(cuò)誤?
講師回答 / qbaty
感覺(jué)沒(méi)有問(wèn)題???是安裝沒(méi)有成功?
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', //視頻中此處 改成這個(gè)
}
}
翻閱了官方文檔 找到原因了
module.exports= {
entry: {
main: './src/script/main.js',
a: ['./src/script/a.js', './src/script/b.js'],
},
output: {
path: './dist/js',
filename: '[name].js', //視頻中此處 改成這個(gè)
}
}
2017-02-21
我這也是這個(gè)
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
運(yùn)行webpack hello.js hello.bundle.js --module-bind 'css=style-loader!css-loader 會(huì)報(bào)錯(cuò)
2017-02-21