🐛 add missing entrypoints to origins#13
Merged
themgoncalves merged 1 commit intothemgoncalves:masterfrom May 20, 2019
p-j:fix/missing-entry-in-origin
Merged
🐛 add missing entrypoints to origins#13themgoncalves merged 1 commit intothemgoncalves:masterfrom p-j:fix/missing-entry-in-origin
themgoncalves merged 1 commit intothemgoncalves:masterfrom
p-j:fix/missing-entry-in-origin
Conversation
Owner
|
@p-j nice But before we proceed, I will run some tests to ensure the package stability. |
themgoncalves
approved these changes
May 20, 2019
Owner
themgoncalves
left a comment
There was a problem hiding this comment.
LGTM, merging pull request.
Owner
|
@p-j your fix was release in the |
Contributor
Author
|
Thanks @themgoncalves 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add missing entrypoints to the origins list
Why
Fixes #8
Background:
Extract from the webpack.config.js
While investing ways of doing SSR + Code Splitting on a large code base that predates framework like Next.js or React Loadable, I came across React Loadable and your Addon.
After a bit a tinkering I was able to first do a "route level" code splitting with SSR that worked. But the chunks generated shared a lot of code and where pretty big, defeating the purpose of code splitting for us.
I looked for ways to reduce the duplication of dependencies across the chunks and came across this article webpack bits: Getting the most out of the CommonsChunkPlugin()
That's when I added this part:
and it produced the expected result: the main bundle (entry point) was bigger and the chuncks much smaller.
The issue I faced then is that, when running
react-loadable-ssr-addonwebpack plugin, the generated manifest was not listing mymainentrypoint in theoriginsanymore for some reason.That's when I found the issue linked above and the proposed solution, I tested it out and it worked like a charm.
I did not investigate much further, test are passing but I did not add new ones for this use case.
Checklist
errorsorwarningsapproved terminologyunit tests, if apply.