Error: Conflict: Multiple chunks emit assets to the same filename ssr-bundle.js
See original GitHub issueHi, I have encountered this problem when I was trying to create multiple html files with multiple entries.
Error: Child compilation failed:
Error: Conflict: Multiple chunks emit assets to the same filename ssr-bundle.js (chunks 1 and 2 )
//webpack config
config.entry = {
a: './a.js',
b: './b.js',
}
Object.keys(config.entry).map(i => {
config.plugins.push(
new HtmlWebpackPlugin({
template: `!!prerender-loader?string!./template.html`,
filename: `${i}.html`,
hash: false,
chunks: [i],
}),
);
});
I have tried below but doesnt make any difference.
template: `!!prerender-loader?${JSON.stringify({ string: true, params: { url: `/${i}/` } })}!./template.html`
"html-webpack-plugin": "^4.0.0-alpha.2",
"prerender-loader": "^1.2.0",
"webpack": "^4.29.3",
"webpack-assets-manifest": "^2.0.0",
"webpack-cli": "^3.1.1",
"webpack-dev-server": "^3.1.14"
node v11.9.0.
Any ideas?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
Conflict: Multiple assets emit to the same filename
The html-webpack-plugin generates an index.html file and automatically injects the bundled js file into it. Share.
Read more >How can I configure Webpack for better optimization? Error ...
Error : Conflict: Multiple chunks emit assets to the same filename main.js. ... Right now I have this code below in the webpack.config.js....
Read more >JavaScript : Conflict: Multiple assets emit to the same filename
JavaScript : Conflict : Multiple assets emit to the same filename [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] JavaScript ...
Read more >Multiple assets emit to the same filename bundle.js - Laracasts
when i try to run mocha using laravel mix it gives me this error. Conflict: Multiple assets emit to the same filename bundle.js....
Read more >Javascript – Conflict: Multiple assets emit to the same filename
I came across a conflict when running my webpack telling me: ERROR in chunk html [entry] app.js Conflict: Multiple assets emit to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@edwardfhsiao alright, I figured out the issue with the demo you linked above: it’s a duplicate of #25, and the solution I posted there a couple hours ago works here too:
@northamerican
<%= htmlWebpackPlugin.options.title %>
just comes fromIt is a format of HtmlWebpackPlugin, which does not really matter in this case.
As for the multiple entry issues, I guess still needs @developit 's help.