wasm-tool / parcel-plugin-wasm.rs

wasm-bindgen support for Parcel bundler
MIT License
66 stars 16 forks source link

Target missmatch when using "WASM_PACK_PROFILE" #24

Closed extraymond closed 5 years ago

extraymond commented 5 years ago

Summary: not looking for target/wasm/debug when build with dev profile. Version: 1.2.13

Reproduce steps:

  1. Build with dev profile, "WASM_PACK_PROFILE=dev parcel index.html"
  2. wasm-pack successfully build with dev -> produced target/wasm/debug
  3. Receive the error not able to find target/wasm/release:
🚨  project/crate/Cargo.toml: ENOENT: no such file or directory, open 'project/crate/target/wasm32-unknown-unknown/release/rust_parcel.d'
Error: ENOENT: no such file or directory, open 'project/crate/target/wasm32-unknown-unknown/release/rust_parcel.d'

Sorry to bother you again. It seems that although the plugin trigger wasm-pack to build with the correct profile, it still watches for compilation target with release profile.

extraymond commented 5 years ago

After some investigation, I found that if build with wasm-pack release first, dev mode will work after hot-reloading.

However, if one try to build with dev profile without a release built, it will trigger the above error.

catsigma commented 5 years ago

Thanks for this report.

catsigma commented 5 years ago

Should be fixed in version 1.2.14

extraymond commented 5 years ago

Thx, it worked without existing release build now.