This repository was archived by the owner on Jul 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 374
build: improve app bundle size and speed up client builds #1555
Merged
Conversation
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
reduces home page bundle significantly
requires explicit usage of emotion's jsx pragma
easier to use and same bundle impact
Contributor
|
Fantastic ! @lei9444 can you help check this? |
cwhitten
approved these changes
Nov 14, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Introduces multiple concepts to address bundle size as well as build performance.
Dynamic imports + React Suspense
This enables webpack to create smaller chunks which reduces the code needed to be sent over the wire for first load. This also improves build speed.
Smarter imports
Eslint rules help us import packages from ES6 modules (like lodash and office ui). Webpack can tree shake these imports resulting in smaller bundles.
Improved typescript support in client
Uses
ts-loaderinstead of babel to parse ts files in the client. It is faster than babel, but did expose some issues (@jsxpragma required for any file usingcssprop -- eslint && fixable).Updates to webpack dependencies
This is suggested by the webpack docs to get the best performance. Some packages jumped major versions. I did not see any issues with the build result though.
Task Item
closes #1289