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

Fix dev server does not restart on save #544

Merged
merged 6 commits into from
Dec 24, 2024
Merged

Fix dev server does not restart on save #544

merged 6 commits into from
Dec 24, 2024

Conversation

webfiltered
Copy link
Contributor

@webfiltered webfiltered commented Dec 20, 2024

  • Requires Add vitest & cross-platform test support #540
  • Renames vite.main.config.ts to vite.config.ts + update refs
  • Converts launchdev.js to launchCI.js - now builds and loads an instance for CI tests only
  • Dev watch/rebuild now uses built-in vite build --watch
  • Regular build mode unaffected
    • Ignores assets and venv

┆Issue is synchronized with this Notion page by Unito

Also unlocks vitest from 2.1.6 - no requirement to be pinned to that version.

Partially reverts: a179d5c
Similar to previous impl., but uses watch mode detection instead of script.
@webfiltered webfiltered marked this pull request as ready for review December 23, 2024 17:03
@webfiltered webfiltered requested a review from a team as a code owner December 23, 2024 17:03
@huchenlei huchenlei merged commit 4828924 into main Dec 24, 2024
7 checks passed
@huchenlei huchenlei deleted the yarn-start branch December 24, 2024 15:56
@christian-byrne
Copy link
Contributor

What is the recommended way to build/watch both packages? Currently the preload is not included.

@webfiltered
Copy link
Contributor Author

webfiltered commented Jan 16, 2025

We could use a proper system for this, but it has not been addressed because preload is such a micro-project that it felt like an ineffective use of time to even add auto recompile. It wouldn't be HMR (no practical solutions for this), and I believe still requires app restart.

A fix that would auto recompile and make the app restart would be to just add a vite plugin. If this is an actual issue though I'd say there's something else fundamentally wrong here. It may be addressed in a PR that will land soon after the maintenance / validation work.

Edit: Workaround. Does not require restart, just need to refresh the page - Ctrl + R.

yarn run vite build --watch --config vite.preload.config.ts

@christian-byrne
Copy link
Contributor

christian-byrne commented Jan 16, 2025

Thanks! Workaround seems good! We should add that to the README.

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.

3 participants