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

unplugin calls addWatchFile #780

Merged
merged 4 commits into from
Oct 29, 2023
Merged

unplugin calls addWatchFile #780

merged 4 commits into from
Oct 29, 2023

Conversation

edemaine
Copy link
Collaborator

@edemaine edemaine commented Oct 15, 2023

Together with unjs/unplugin#345, this will fix eventually #773.

I have tested this (yarn linking to my unplugin fork), using the new esbuild example code.

For now, it might fix watch mode on other build systems. But I wasn't able to test because e.g. Vite dev mode is currently broken (#775).

Update: The types don't work until the unplugin PR gets merged. So maybe we should wait for that.

@edemaine edemaine temporarily deployed to build October 29, 2023 17:41 — with GitHub Actions Inactive
@edemaine
Copy link
Collaborator Author

This is now ready for review! I moved the addWatchFile call to the load callback, which is already supported by the types and API, and lets us merge this now.

I did some testing and this fixes watch mode on Rollup and Webpack! It should also fix esbuild (and #773) once unjs/unplugin#345 gets merged. It still doesn't fix Vite (on Windows or Linux), for some reason I don't yet understand. But... progress?

@edemaine edemaine temporarily deployed to build October 29, 2023 17:49 — with GitHub Actions Inactive
@edemaine edemaine merged commit f66b251 into main Oct 29, 2023
3 checks passed
@edemaine edemaine deleted the watch branch October 29, 2023 18:05
@edemaine edemaine mentioned this pull request Nov 5, 2023
5 tasks
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.

2 participants