Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

chore(web): use react-scripts for web bundle #13

Merged
merged 6 commits into from Jul 19, 2020

Conversation

r17x
Copy link
Member

@r17x r17x commented Jul 18, 2020

Currently we use basic webpack configuration by bsb init with react-hooks template. I think, we can use react-scripts for small bundle in current web application.

Step to Migrate

  • remove webpack (with related dependencies as plugins) ef117e5
  • add react-scripts 7eed88d
  • make project structure compatible with react-scripts 8c23120

Maintain

  • upgrade dependencies 8c23120
  • etc (chore things) 7eed88d
  • refactor: need changes after upgrade dependencies 1c4bb1b
  • improve docker build (reduce time build in golang project) b2a0bd5

Bundle Size

Before

image

After

image

File sizes after gzip:

  120.09 KB  build/static/js/2.aed0ec68.chunk.js
  3.17 KB    build/static/js/main.4d614ac1.chunk.js
  783 B      build/static/js/runtime-main.4ac9ccea.js

Docker Build

image

@r17x r17x added the WIP work in progress label Jul 18, 2020
@r17x r17x requested a review from faultables July 18, 2020 06:39
r17x added 2 commits July 18, 2020 15:07
update Dockerfile
update scripts in web
add logo favicon and manifest
update index.html
add index.js for support react-scripts
updaate bsconfig.json for bs-webapi
@r17x r17x marked this pull request as ready for review July 18, 2020 09:09
@r17x r17x requested a review from kevanantha July 18, 2020 09:12
@r17x r17x added enhancement New feature or request and removed WIP work in progress labels Jul 18, 2020
Copy link
Member

@faultables faultables left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTA

@r17x r17x merged commit 0642409 into master Jul 19, 2020
@faultables faultables deleted the chore/migration-react-scripts branch October 14, 2020 06:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants