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

Consolidate JS build tooling #612

Closed
3 tasks done
Tracked by #673
holic opened this issue Apr 11, 2023 · 3 comments
Closed
3 tasks done
Tracked by #673

Consolidate JS build tooling #612

holic opened this issue Apr 11, 2023 · 3 comments
Assignees

Comments

@holic
Copy link
Member

holic commented Apr 11, 2023

We currently have a wide mix of these, and we should probably consolidate:

  • parcel, rollup, vite
  • tsup, tsc, esbuild
  • ts-node, tsx

If we're able to get rid of parcel in network package, we should remove engines from package.json (it's only there to fix parcel build issues).

@alvrs
Copy link
Member

alvrs commented Apr 12, 2023

@roninjin10's context from discord:

Vite
Pro - 1 tool that can build everything
Pro - Doubles as a test config don't need to configure babel or anything like with jest
Pro - Should have less hacky than otherwise ways of configuring dev builds to work with hot reloading
Con - Bit of overkill

Tsup
Pro - Really fast even for prod build since it uses esbuild instead of rollup
Pro - Really simple to configure
Pro - Definitely much simpler tool than vite
Con - You are forced to use different tool once you need to bundle an actual website or non typescript or struggle configuring it with tsup

Tsc
Pro - It's typescript it's kinda the most obvious tool to use
Pro - Simplist to configure (sometimes)
Con - less forgiving than using esbuild
Con - slow
Con - boring

Parcel
con - meh

Rollup
Pro - most well documented build tool in js ecosystem
Pro - Plugin for everything
Pro - one build tool can do everything
Con - vite is basically a better version of rollup

Based on this I think we should try to consolidate to use vite everywhere

@holic
Copy link
Member Author

holic commented Apr 24, 2023

vite -> tsup happened in #660

just need to do parcel/rollup ones now!

@holic
Copy link
Member Author

holic commented Apr 24, 2023

we should probably document/clarify when to use tsup over tsc
(schema-type still uses tsc, which seems ~fine but unclear when to use which tool)

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

2 participants