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

Code splitting and preventing duplication #3728

Closed
winkerVSbecks opened this issue Jan 9, 2018 · 3 comments
Closed

Code splitting and preventing duplication #3728

winkerVSbecks opened this issue Jan 9, 2018 · 3 comments

Comments

@winkerVSbecks
Copy link

winkerVSbecks commented Jan 9, 2018

Is this a bug report?

Not a bug but, looking for some clarification

Which terms did you search for in User Guide?

Code Splitting, CommonsChunkPlugin, bundle-buddy


The user guide has a section on code splitting that focuses on dynamic import. However, I don't see any info on preventing duplication.

The webpack code splitting guide and bundle-buddy recommend using CommonsChunkPlugin to prevent code duplication across multiple chunks. However, it seems that CRA is not using CommonsChunkPlugin. Is the duplication being prevented via some other mechanism? If not, would you be open to a PR that adds CommonsChunkPlugin to webpack.config.prod.js.

Thanks!

@winkerVSbecks winkerVSbecks changed the title Code splitting and preventing duplication CommonsChunkPlugin Code splitting and preventing duplication Jan 9, 2018
@gaearon
Copy link
Contributor

gaearon commented Jan 10, 2018

Related: #3145 #2310

I honestly don't know what's the right way to do it these days. We might need someone from webpack to help us with determining the right approach.

@gaearon
Copy link
Contributor

gaearon commented Jan 10, 2018

Hehe.

I had no idea about this but it's probably what we want: webpack/webpack#6281

@gaearon
Copy link
Contributor

gaearon commented Jan 20, 2018

This is superseded by #3878.

@gaearon gaearon closed this as completed Jan 20, 2018
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants