wasm-pack-plugin icon indicating copy to clipboard operation
wasm-pack-plugin copied to clipboard

Request: automatically ignore gitignore'd directories in watchDirectories

Open rbalicki2 opened this issue 4 years ago • 2 comments

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 :)

rbalicki2 avatar Aug 11 '19 16:08 rbalicki2

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.

DarthGandalf avatar Jan 11 '20 09:01 DarthGandalf

.hgignore and similar should probably also be used as source of ignore, since not everything uses git

DarthGandalf avatar Jan 11 '20 09:01 DarthGandalf