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

Set jsonpFunction by default #5951

Merged
merged 5 commits into from
Aug 5, 2019
Merged

Set jsonpFunction by default #5951

merged 5 commits into from
Aug 5, 2019

Conversation

sibiraj-s
Copy link
Contributor

@sibiraj-s sibiraj-s commented Dec 3, 2018

Hi,

jsonpFunction, is set by default to prevent conflicts within app when multiple webpack runtimes (from different compilation) are used on the same webpage.

For example, a widget built with webpack being loaded into a site which is too webpacked.

https://webpack.js.org/configuration/output/#output-jsonpfunction

@netlify
Copy link

netlify bot commented Dec 6, 2018

Deploy preview for create-react-app ready!

Built with commit 8be8452

https://deploy-preview-5951--create-react-app.netlify.com

@ianschmitz ianschmitz added this to the 2.1.4 milestone Jan 7, 2019
@ianschmitz ianschmitz modified the milestones: 2.1.4, 2.1.5 Feb 10, 2019
@iansu iansu modified the milestones: 2.1.6, 2.1.x, 3.x Mar 6, 2019
@sibiraj-s
Copy link
Contributor Author

@ianschmitz any update on this.

@mrmckeb mrmckeb self-assigned this Jul 24, 2019
@mrmckeb mrmckeb modified the milestones: 3.x, 3.1 Jul 24, 2019
@mrmckeb
Copy link
Contributor

mrmckeb commented Jul 24, 2019

@sibiraj-s, I'd love to help you get this through.

This seems to introduce a different issue, in two apps built in CRA would still conflict. Could we use the app name instead? It's available within the config as a variable.

@mrmckeb mrmckeb self-requested a review July 24, 2019 17:43
@sibiraj-s
Copy link
Contributor Author

This seems to introduce a different issue, in two apps built in CRA would still conflict.

Yeah. I didn't think of that. Will update.

@mrmckeb
Copy link
Contributor

mrmckeb commented Jul 28, 2019

Thanks, let me know when that's done @sibiraj-s - I think we can land this in 3.1 if you can get it done in the next few days.

@sibiraj-s
Copy link
Contributor Author

sibiraj-s commented Jul 29, 2019

@mrmckeb

It's available within the config as a variable.

I searched for one. but i couldn't find any. Should I go ahead add one?

incase If i missed it. Can u point me.

@mrmckeb
Copy link
Contributor

mrmckeb commented Aug 1, 2019

Sorry, you're right!

Just require in the package.json as we do here:

const appPackage = require(path.join(appPath, 'package.json'));

Then you can use appPackage.name :)

@mrmckeb mrmckeb merged commit 066053c into facebook:master Aug 5, 2019
@sibiraj-s sibiraj-s deleted the set-jsonpfunction branch August 5, 2019 13:54
@lock lock bot locked and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants