I am trying to learn to use Trunk and Yew so I tried to follow a very simple example of Trunk, created a neatly empty index.html in the root of my rust project (just the main tags and made trunk build
the thing fails with: trunk build 2023-03-13T16:56:38.507326Z INFO starting build 2023-03-13T16:56:38.507905Z INFO spawning asset pipelines 2023-03-13T16:56:38.643288Z INFO building rust-frontend-example-yew Finished dev [unoptimized + debuginfo] target(s) in 0.07s 2023-03-13T16:56:38.773599Z INFO fetching cargo artifacts 2023-03-13T16:56:38.915318Z ERROR ❌ error error from HTML pipeline
Caused by: 0: error from asset pipeline 1: could not find WASM output after cargo build Error: error from HTML pipeline
Caused by: 0: error from asset pipeline 1: could not find WASM output after cargo build
There is nothing in /dist
I cannot find ANYONE in the internet with this exact error and I am at loss on why the simplest example fails. Does anyone have a clue on what I can look for?
I already installed wasm-bindgen-cli by cargo install btw.
I had the same error when I tried to serve a combined project of lib and bin:
The index.html file needs
<link data-trunk rel="rust" data-bin="bin" />
and I had to update the wasm-bindgen-cli:
cargo install -f wasm-bindgen-cli