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

Remove react/react-dom/etc from externals #68

Open
rmccue opened this issue Dec 29, 2020 · 3 comments
Open

Remove react/react-dom/etc from externals #68

rmccue opened this issue Dec 29, 2020 · 3 comments

Comments

@rmccue
Copy link
Member

rmccue commented Dec 29, 2020

1e26dfd configured react/react-dom/moment as externals. This removes the ability for users to control these scripts, and goes against the original purpose of react-wp-scripts (for SPAs) as it introduces a hard dependency on core's version of these scripts.

(Might be worth a setting of some sort for this?)

@roborourke
Copy link
Contributor

I feel like this is a reasonable default considering this version of react-scripts is geared towards WP and has a significant impact on the end bundle size. Happy to have a flag that sets it otherwise though to cover all the bases / use-cases.

@rmccue
Copy link
Member Author

rmccue commented Jan 6, 2021

and has a significant impact on the end bundle size

Users end up loading the same amount of data regardless, so it's not too big of an issue on that front.

@roborourke
Copy link
Contributor

Not if something is loading WP's version of React as well. That's really what this is addressing - the plugin use-case.

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

No branches or pull requests

2 participants