Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite project build setup using ESBuild and a common app skeleton #28

Merged
merged 24 commits into from
Sep 22, 2021

Conversation

markerikson
Copy link
Collaborator

@markerikson markerikson commented Sep 17, 2021

This PR:

  • Updates the package management to Yarn 2 (same as the React-Redux repo)
  • Adds an ESBuild-powered build setup based on Redux Toolkit's build process
  • Sets up a new common app skeleton based on the concepts in @dai-shi 's https://github.com/dai-shi/will-this-react-global-state-work-in-concurrent-rendering , where each individual scenario only has to provide its own implementation-specific details
  • Adds a dummy counter example just to prove that the build process works, and ports the twitter-lite scenario

This will improve the overall setup for this repo in a bunch of ways:

  • We can build separate outputs for every version+scenario in the matrix, and it's still almost instantaneous thanks to ESBuild
  • The common app setup code (<Profiler>, FPS, etc) no longer has to be copy-pasted between projects
  • All the code for installing the CRA deps for every single scenario folder can go away
  • We can use the real NPM packages for React, ReactDOM, and Redux, while using aliases for the specific React-Redux versions we want to test. This removes the need to load each package in as a UMD file on disk

Update 1

  • Got the build output correctly aliasing different React-Redux versions, and including the React profiling build.
  • Updated the benchmark runner to accept CLI args instead of reading from env vars, and to correctly load and run the benchmark scenarios
  • Fixed missing import of the fps-emit file
  • Ported the stock-ticker, tree-view, and forms scenarios

Update 2

Got all the remaining scenarios ported over. I'll clean up the dead CRA projects in a follow-up PR.

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.

None yet

1 participant