-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
this.addWatchFile
rollup compatibility
#3216
Comments
I recently added a workaround for that in vite-plugin-svelte by triggering virtual change events on the watcher. Could be useful here aswell? But i guess internally in vite it would be easier to just call the handler directly and skip the watch event. |
Hello @DylanPiercey. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it! |
Just dropping in my use-case for this feature as requested. Our CSS-in-JS library vanilla-extract runs JS/TS files (e.g. Other prior art here is the webpack addDependency API. |
Clear and concise description of the problem
There is an API incompatibility with
rollup
for theaddWatchFile
api.Specifically the first note after the
addWatchFile
documentation mentions the following:In
Vite
this.addWatchFile
does nothing special in this case and just tracks the new file independently.Suggested solution
Ideally we'd mirror the
rollup
behavior.The text was updated successfully, but these errors were encountered: