Multi-entry setup
Juraj-Masiar opened this issue · 4 comments
Juraj-Masiar commented
Hello,
Is there a support for multi-entry html?
Right now I have multiple HtmlWebpackPlugin instances for each html file:
plugins: [
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: "[id].css"
}),
...inputFiles.map(path => new HtmlWebpackPlugin({
inject: true,
chunks: [path],
filename: `${path}.html`,
template: `src/${path}.html`,
})),
new HTMLInlineCSSWebpackPlugin({
leaveCSSFile: false,
}),
But the injected CSS is not right because all html files contains all css tyles.
runjuu commented
Hi @icl7126 , can you provide a minimal demo that can produce this issue?
Juraj-Masiar commented
Sure thing!
MultiEntryDemo.zip
Steps to reproduce:
- extract zip
npm inpm run w- check new folder
target- it contains two folders with two html files - both files contains all css styles from both css files
Also the<link href="../note/note.css" rel="stylesheet">is still present before the actual inline style.
runjuu commented
Hi @icl7126 , I fixed the issue at 1.7.0. Let me know if there is any problem
Juraj-Masiar commented
@runjuu Thank you!!! It works perfectly now!
Also it's nice to see I'm not the only one programming on Sunday :)