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

Migrate to esbuild #4701

Closed
wants to merge 25 commits into from
Closed

Migrate to esbuild #4701

wants to merge 25 commits into from

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Aug 20, 2023

This is a work in progress, here are the goals of the change:

  • Reduce build/watch time
  • Reduce bundle size
  • Simplify build by removing webpack and having dev builds run the same way
  • Simplify sourcemaps
  • Self host with the demo in a way that's closer to real world usage by importing the modules

Currently building everything from scratch takes less than a second(!), compared to ~16 seconds for tsc on my machine:

image

Current issues:

  • There are some complications particularly around inwasm, the image addon build doesn't work yet.
  • Not sure how to handle tests yet, for now we can continue to build them to out/ and out-test/ and run them the old way as we need to do a full tsc build anyway to check types.
  • VS Code task order could be improved
  • The demo-client build can fail when run currently as it actually depends on xterm*

@Tyriar Tyriar self-assigned this Aug 20, 2023
@Tyriar
Copy link
Member Author

Tyriar commented Aug 20, 2023

Looks like this sort of thing will work for tests:

.\node_modules\.bin\esbuild src/**/*.ts --outdir=out-esbuild --format=cjs

@jerch
Copy link
Member

jerch commented Aug 21, 2023

There are some complications particularly around inwasm, the image addon build doesn't work yet.

Does this use ESM output for addon sources? Because thats not fully supported yet with inwasm.

@Tyriar
Copy link
Member Author

Tyriar commented Aug 21, 2023

It does yeah as that's something else people want (and VS Code supports now). I think we could special case the image addon in the meantime

@Tyriar
Copy link
Member Author

Tyriar commented Aug 21, 2023

Putting this on hold as it was a weekend project that didn't make it in time 🙂

@Tyriar Tyriar added the reference A closed issue/pr that is expected to be useful later as a reference label Nov 2, 2023
@Tyriar Tyriar closed this Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reference A closed issue/pr that is expected to be useful later as a reference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants