liveblog icon indicating copy to clipboard operation
liveblog copied to clipboard

Avoid namespace collision with multi-webpack runtimes

Open ellm opened this issue 4 years ago • 3 comments

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.

ellm avatar Jun 05 '20 11:06 ellm

cc @pypwalters

paulschreiber avatar Jun 05 '20 20:06 paulschreiber

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

paulschreiber avatar Jun 05 '20 21:06 paulschreiber

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

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

ellm avatar Jun 08 '20 19:06 ellm