Skip to content

build: Smaller frontend bundle#181

Merged
stanleyjones merged 1 commit intoliftedinit:mainfrom
stanleyjones:smaller-frontend
Mar 10, 2023
Merged

build: Smaller frontend bundle#181
stanleyjones merged 1 commit intoliftedinit:mainfrom
stanleyjones:smaller-frontend

Conversation

@stanleyjones
Copy link
Copy Markdown
Contributor

@stanleyjones stanleyjones commented Mar 10, 2023

This PR is really the result of lots of work in other repositories:

All of which results in reducing this...

> talib@0.1.0 build        
> npm run build --workspaces
               
> talib-client@0.1.0 build        
> react-app-rewired build        
               
Creating an optimized production build...        
Compiled successfully.        
               
File sizes after gzip:        
               
  675.19 kB  build/static/js/main.aef4399c.js        
  1.17 kB    build/static/css/main.52f98c44.css        
               
The bundle size is significantly larger than recommended.

npm run build  27.74s user 1.88s system 189% cpu 15.606 total

...to this...

> talib@0.1.0 build
> npm run build --workspaces

> talib-client@0.1.0 build
> tsc && vite build

vite v4.1.4 building for production...
✓ 788 modules transformed.

dist/assets/index-ce538a8a.css                              6.24 kB │ gzip:   0.74 kB
dist/assets/index-a31389d2.js                             948.88 kB │ gzip: 302.29 kB

npm run build  10.88s user 0.82s system 166% cpu 7.038 total

So a 55% decrease in size of the front-end bundle and 2.5x faster build time!

@stanleyjones stanleyjones self-assigned this Mar 10, 2023
@stanleyjones stanleyjones requested a review from hansl March 10, 2023 23:16
@stanleyjones stanleyjones merged commit f1d5c82 into liftedinit:main Mar 10, 2023
@stanleyjones stanleyjones deleted the smaller-frontend branch March 10, 2023 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant