Excalibur
Excalibur copied to clipboard
Support HMR
Discussed in https://github.com/excaliburjs/Excalibur/discussions/1817
Originally posted by DrSensor March 15, 2021 Any tips on how to do hot reloading using ESM HMR API? Or is it already supported out of the box?
(I'm using vite)
Investigate effort to support HMR, or at least some sort of MVP that will not make the dev experience entirely manual (like manually stopping/starting, etc.)
This issue hasn't had any recent activity lately and is being marked as stale automatically.
Here how i've solved this:
- Create a vite project (npm create vite)
- Then after entering your project name, select vanilla and then select typescript
- Now you have a HMR Enabled Typescript project with Vite (its a really reliable and fast framework)
- Install excalibur (npm i excalibur)
- Edit your main.ts, refactor your src folder, run development script to see changes in real time (npm run dev)
- Enjoy 🎉
@ufukbakan Nice! Thanks for the info, I'll update the documentation to include this