wasm-tool / wasm-pack-plugin

webpack plugin for Rust
MIT License
314 stars 70 forks source link

Request: ability to automatically watch local crates #65

Open rbalicki2 opened 5 years ago

rbalicki2 commented 5 years ago

Hello! I'd love to have the ability to automatically watch local dependencies, i.e. those that are specified in my Cargo toml as:

foo={ path="../another-crate" }

Currently, I watch these using the watchOptions plugin. Ideally, this would be able to follow the Cargo toml's dependencies recursively.

Thank you for the wonderful plugin!

kuon commented 5 years ago

I am curious, what is your workaround for this?

FruitieX commented 2 years ago

@kuon this seems to work (from the README):

new WasmPackPlugin({
  crateDirectory: path.resolve(__dirname, "wasm"),
  extraArgs: "--target web",

  watchDirectories: [
    path.resolve(__dirname, "wasm-shared/src")
  ],
}),