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

Switch build system from ncc to esbuild #75

Merged
merged 2 commits into from
Apr 14, 2023
Merged

Switch build system from ncc to esbuild #75

merged 2 commits into from
Apr 14, 2023

Conversation

mcous
Copy link
Member

@mcous mcous commented Apr 8, 2023

Overview

This PR changes the build system from the Webpack-based ncc to ESBuild for speed and security. ESBuild is much faster than ncc and has no additional dependencies, unlike ncc which is (relatively) slow and pull in many dependencies.

Notable changes

  • ESBuild appears to be successfully bundling the semver dependency, so it's no longer required to commit node_modules/semver to revision control
  • Weird coverage-related failures in Windows CI have beeen resolved
  • src has been added to the npm package so compiled JS can link back to the TS source

Future work

After this build change is in, the following items can be worked on

  • Upgrade TypeScript and ESLint to recent versions
  • Pull in Vitest
  • Simplify module internals
  • (Maybe) Move asset generation to a CI workflow

@mcous mcous changed the title Switch build system from ncc to vite Switch build system from ncc to esbuild Apr 12, 2023
@mcous mcous force-pushed the vite-build branch 2 times, most recently from 92b492e to bfe1b21 Compare April 13, 2023 00:19
@mcous mcous requested a review from razor-x April 13, 2023 00:35
@mcous mcous marked this pull request as draft April 13, 2023 21:03
@mcous mcous marked this pull request as ready for review April 13, 2023 21:03
@mcous mcous added the chore General maintenance task label Apr 14, 2023
@mcous mcous merged commit bfc489d into main Apr 14, 2023
@mcous mcous deleted the vite-build branch April 14, 2023 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore General maintenance task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant