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

Use unique webpack jsonp function names per-project #102

Merged
merged 1 commit into from Oct 16, 2019

Conversation

colingourlay
Copy link
Contributor

@colingourlay colingourlay commented Oct 16, 2019

Webpack uses jsonp to track its dynamic loading of chunks in multi-file packages, and by default uses the same global function name for its callback.

This creates problems when multiple webpack-built multi-file projects are running in the same page (for example, Presentation Layer + Odyssey). All projects that execute after the first are unable to let webpack know that their chunks have loaded because their status updates to the first app (which is unaware of other projects).

This change to aunty's default webpack config factors the package name into the jsonp function name, which should ensure that apps don't step on each others toes, and get all the callbacks they expect.

@colingourlay colingourlay merged commit d34a361 into master Oct 16, 2019
@colingourlay colingourlay deleted the unique-webpack-jsonp branch October 16, 2019 22:27
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