Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Conversation

@a-b-r-o-w-n
Copy link
Contributor

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-loader instead of babel to parse ts files in the client. It is faster than babel, but did expose some issues (@jsx pragma required for any file using css prop -- 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

@a-b-r-o-w-n a-b-r-o-w-n changed the title Improve app bundle size and speed up client builds build: improve app bundle size and speed up client builds Nov 12, 2019
@boydc2014
Copy link
Contributor

Fantastic ! @lei9444 can you help check this?

@a-b-r-o-w-n a-b-r-o-w-n merged commit d0ed216 into microsoft:master Nov 14, 2019
@a-b-r-o-w-n a-b-r-o-w-n deleted the bundle-size branch November 14, 2019 18:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants