Excalibur icon indicating copy to clipboard operation
Excalibur copied to clipboard

Support HMR

Open kamranayub opened this issue 3 years ago • 4 comments

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.)

kamranayub avatar Sep 11 '21 05:09 kamranayub

This issue hasn't had any recent activity lately and is being marked as stale automatically.

github-actions[bot] avatar Dec 09 '21 00:12 github-actions[bot]

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 avatar Jun 27 '23 17:06 ufukbakan

@ufukbakan Nice! Thanks for the info, I'll update the documentation to include this

eonarheim avatar Jun 28 '23 03:06 eonarheim