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

Improve build #223

Merged
merged 7 commits into from
Aug 2, 2024
Merged

Improve build #223

merged 7 commits into from
Aug 2, 2024

Conversation

Timothy-Gonzalez
Copy link
Member

Resolves #216

  • Convert from ESM to CJS
    • This is a hard decision, but ultimately we gain nothing from ESM except a lot of tooling not working with it (jest).
    • I spent 3 hours trying to get emitDecoratorMetadata to work with ESM to use a bundler to have .ts file extensions, it didn't work. If we could disable that in the future, it might make sense.
    • When esm support is more stable with jest ESM might make sense
    • The reality is ESM was designed for the web, and works great from the web, but not really for node.js backend. There's a reason that CJS is still used. In the future, if it makes more sense, we can convert back.
  • Remove hacky custom serve script in favor of tsc-watch
  • Remove vercel

ESM is not worth the effort for backend

This commit does not stand on it's own - this commit leaves the build
broken to be fixed in the next commit.
This was a hard choice, but ultimately ESM is not worth it for backend
in its current state. It makes sense for web dev, but not for backend.
@Timothy-Gonzalez Timothy-Gonzalez merged commit d7c4e40 into main Aug 2, 2024
4 checks passed
@Timothy-Gonzalez Timothy-Gonzalez deleted the dev/timothy/improve-build branch August 2, 2024 07:03
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.

Remove .js from imports
1 participant