-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Conflict: Multiple chunks emit assets to the same filename ssr-bundle.js #29
Comments
Testing repo https://github.com/edwardfhsiao/prerender-loader-test-repo $ npm i
$ npm run compile
|
|
I think I found the issue, I was using |
@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: Object.keys(config.entry).map(i => {
config.plugins.push(
new HtmlWebpackPlugin({
- template: `!!prerender-loader?string!${PATH.HTML_PATH}/template.html`,
+ template: `!!prerender-loader?string&entry=${config.entry[i]}!${PATH.HTML_PATH}/template.html`,
// etc
}),
);
}); |
@developit Awesome, that solved my problem. Really appreciate your help! |
@edwardfhsiao @developit This issue may have to be looked at again. The error still occurs if using the I spent many hours trying to debug our config and was still getting the multiple chunks error until i realized this. To replicate, replace the template.html file in the example repo (https://github.com/edwardfhsiao/prerender-loader-test-repo) with:
and run It's not clear where the I can open a new issue if needed. |
@northamerican new HtmlWebpackPlugin({
...
title: `${i}`, It 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. |
Hi, I have encountered this problem when I was trying to create multiple html files with multiple entries.
I have tried below but doesnt make any difference.
template: `!!prerender-loader?${JSON.stringify({ string: true, params: { url: `/${i}/` } })}!./template.html`
node v11.9.0.
Any ideas?
The text was updated successfully, but these errors were encountered: