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

Vite Dev Server implementation #11

Merged
merged 6 commits into from
Mar 15, 2024

Conversation

ToxicKevinFerm
Copy link
Contributor

Introducing a new command WATCH=1 make devmode.
This new dev mode essentially uses the Vite Dev server, meaning we get automatic reloads on saving ts files and go files.

Since we only build what is absolutely necessary in this mode, you get sub-second reloads on ts changes, and recompiling the go server also only takes a few seconds.

This allows for high productivity development.

To get this to work, I had to modify the Vite dev server a bit, mainly to allow serving of assets in the /assets folder instead of /dist. I also had to add another worker js to send requests to the go server through POST requests. This is because we don't want to have to reload the page when we update the Go code in the sim.

This is currently very experimental and although it works on my machine, it might not work everywhere.

@ToxicKevinFerm ToxicKevinFerm changed the title WIP: Draft: Experimental Vite Dev Server working Vite Dev Server implementation Mar 14, 2024
@ToxicKevinFerm ToxicKevinFerm marked this pull request as ready for review March 14, 2024 09:40
@ToxicKevinFerm ToxicKevinFerm merged commit ab99f81 into wowsims:master Mar 15, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant