wasm-pack-plugin
wasm-pack-plugin copied to clipboard
Request: automatically ignore gitignore'd directories in watchDirectories
Hello,
I am lazy. I would like to be able to specify: watchDirectories: [ path.resolve(__dirname, '../path-to-workspace') ]
instead of pointing to the src
directory inside of each crate. If I point to the root of the workspace, I get a lot of simultaneous rebuilds (as presumably, it's watching the target directory).
This may have something to do with the fact that I'm running tests in one of the directories, thus creating new files in that crate's target
directory.
For now, I'm pointing watchDirectories
to each of the src libs within the crate, which is working just fine.
Thanks for your wonderful plugin :)
Not only directories, but also files mentioned in .gitignore should be ignored.
I had to move swp files of vim to a custom location, because when vim keeps writing them, wasm-pack-plugin notices the writes, rebuilds rust, and webpack-dev-server reloads the browser, making the web app unusable/untestable due to constant reloads.
.hgignore and similar should probably also be used as source of ignore, since not everything uses git