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

Use a build-helper library instead of DIY #3

Open
mmkal opened this issue Aug 24, 2023 · 1 comment
Open

Use a build-helper library instead of DIY #3

mmkal opened this issue Aug 24, 2023 · 1 comment

Comments

@mmkal
Copy link
Owner

mmkal commented Aug 24, 2023

Possibilities:

  • microbundle
    • Pros:
    • Cons:
      • I don't really need to bundle, just to compile and create a wrapper .mjs file
      • I don't know if it creates wrappers, instead it would create two separate outputs, one for commonjs and one for ESM, which would hit the dual-package hazard. I'm not totally convinced that's a major issue for this library since it just provides helpers for building your own fetch, but probably better to avoid to be safe
      • Doesn't use esbuild or swc (yet)
      • Last publish a year ago (at time of writing, 2023-08-24)
  • unbuild
    • Pros:
      • Seems it can build-helpfully rather than bundle
      • Seems easy to configure
      • Last publish 2 days ago
      • Update April 2024: Last publish 8 months ago
    • Cons:
      • Haven't used
      • Marginally less popular than microbundle
  • tsup
    • Seen good people use it (trpc, panda)
  • just tsc, no -> .cjs conversion
    • The original and still the best
    • Given we don't really need a separate ESM bundle, maybe this is better
@mmkal
Copy link
Owner Author

mmkal commented Jan 30, 2024

tsup looks good, tried it on mmkal/pg-suite

also, no need to create a wrapper mjs file. es modules will still be able to import just fine

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

No branches or pull requests

1 participant