Skip to content
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

Avoid namespace collision with multi-webpack runtimes #660

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ellm
Copy link

@ellm ellm commented Jun 5, 2020

If multiple webpack runtimes (from different compilations) are used on the same webpage, there is a risk of conflicts of on-demand chunks in the global namespace.

See: https://webpack.js.org/configuration/output/#outputjsonpfunction

When a conflict occurs, it causes a fatal JS error. I have experienced this behavior when a site bundle and Liveblog bundle are loaded on the same page.

According to Webpack documentation, changing output.jsonpFunction to a custom name will avoid the collision.

@paulschreiber
Copy link
Contributor

cc @PypWalters

@paulschreiber
Copy link
Contributor

@ellm have you looked at https://github.com/paulschreiber/liveblog ?

@ellm
Copy link
Author

ellm commented Jun 8, 2020

@ellm have you looked at https://github.com/paulschreiber/liveblog ?

Thanks @paulschreiber - I have not. I'll take a look though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants