codepod-io / codepod

Codepod IDE: Scalable Interactive Coding
https://codepod.io
MIT License
74 stars 15 forks source link

Replace CRA with vite #468

Closed lihebi closed 1 year ago

lihebi commented 1 year ago

CRA has many problems:

  1. It is deprecated: even no longer recommended by the React team
  2. Webpack is complex to deal with. E.g., we had to use "react-app-rewired" walkaround to make Monaco editor in CRA's webpack bundler.

Vite is simple and nice. One bonus: Vite has a much better Hot Module Replacement (HMR), the hot-reloading experience is now much better (previously was pretty much unusable).

Some changes from vanilla Vite scaffolding:

  1. listen on --host; listen on port 3000, set HMR WS forwarding in nginx.conf
  2. fix App.css styling issues
  3. set "experimentalDecorators": true, in tsconfig, and set { tsDecorators: true } in vite.config to allow Remirror's decorators.
senwang86 commented 1 year ago
Screenshot 2023-08-24 at 9 20 55 PM