trunk-rs / trunk

Build, bundle & ship your Rust WASM application to the web.
https://trunkrs.dev/
Apache License 2.0
3.53k stars 254 forks source link

Support for ignoring autosave files #813

Open ydirson opened 5 months ago

ydirson commented 5 months ago

Some editors use autosave files to protect against data loss without clobbering the edited file itself - e.g. Emacs uses #main.rs# as autosave for main.rs. Currently, every time an autosave is written, trunk serve triggers a spurious rebuild, which is both wasteful and distracting. It looks like the watch.ignore setting in Trunk.toml only allows to specify exact pathnames, so we cannot just add a pattern like #*# to get the expected result.

Further more, we cannot even list such frequently-appearing individual backup files by name, since they must exist when Trunk starts (why does it even care?)

ctron commented 4 months ago

Yes, that would be great!