sipb / hydrant

MIT semester course planning app
https://hydrant.mit.edu/
MIT License
27 stars 18 forks source link

Migrate to Parcel #57

Open 101arrowz opened 1 year ago

101arrowz commented 1 year ago

Apologies for the large change, but the majority of this diff is from the lockfile. I thought it would be a good idea to move off of Create React App since I need to refactor most of the build tooling anyway to make things work nicely with Node.js.

I understand if switching the build tooling entirely is too big a change to make, but we will need to sacrifice a lot of developer experience on the server-side code if we stay with CRA. This change makes hot reload on the frontend dramatically faster, and it obviously makes backend HMR much more doable.

I did consider using ts-node-dev in parallel with the current CRA infrastructure, but I don't think it would be nearly as nice for DX. If you don't like this change we can do that instead though.

I'll highlight the parts of this diff that actually should get reviewed; the rest aren't very relevant.

cjquines commented 1 year ago

also thanks for the work!!

101arrowz commented 1 year ago

Updated the docs a little but they're obviously not close to done. I'd like to be able to make the backend switch incrementally in a few separate PRs by the way; could you make a feature branch (node-backend or something) so I can PR to that without screwing up the main branch in the meanwhile? That should also make the incomplete docs less of an issue.

101arrowz commented 1 year ago

As you mentioned it would be a good idea to get Prettier set up and make the Fastify backend actually work in a separate PR, but I'd prefer to do that after this is merged to avoid merge conflicts.

Also, it's possible (but a pretty big pain) to undo some of the changes that aren't strictly related to Parcel (e.g. the beginnings of the backend) and redo them in a PR without ejecting CRA. I decided to do them in one go because the backend's development lifecycle actually depends on Parcel too, and doing them separately would've been pretty annoying, but I can still undo it if needed.

101arrowz commented 1 year ago

FYI I started some work on the Fastify server. Zod + Fastify is so much nicer to work with than Express!