Merged
Conversation
This ensures we're not importing any code we aren't using, as Webpack's tree shaking isn't perfect.
This ensures the history module only uses the ES modules, rather than both ES modules and legacy modules, roughly halving the size of imports there.
We already use redux-devtools-extension, so we don't need this. This also further reduces the production, as we were loading it in production too for some reason.
This removes an unused experiment in the code.
Member
Author
|
Note that bundlesize is showing 228.52KB rather than 206.81KB, because I haven't committed the with-api-data update. Once the PR's merged, I'll update here and we can merge. If anyone's wondering why the bundle is so big: 475.86KB of the 990.57KB (48%) is the emoji data. I explored this a bit in #263 but due to webpack's deficiencies, we can't really reduce this right now. In theory, we could knock off another 90KB by using only the Twitter dataset instead of the combined, but we'd still have 385KB of 900KB used on it. Emoji is just a big data set! |
This uses a minimal import from Lodash.
Member
Author
|
Updated with-api-data and we're down to 206KB. |
pdewouters
approved these changes
Sep 11, 2018
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.
Reduces the bundle size by removing unused/redundant code. This gets us down to under 1MB (990.57KB) for raw size, and 206.81KB gzipped.
Incremental reductions (in gzipped size, raw size is ~10x):
history: 788BSome other candidates we may want to consider:
Fixes #264, makes some progress on #260. Blocked on joehoyle/with-api-data#4 for now though.