Run rustup update
to get the latest version of Rust
After installing Rust
, you can use Cargo to install trunk by running:
cargo install --locked trunk
We will also need to add the WASM build target by running:
rustup target add wasm32-unknown-unknown
First clone the project and get into it's folder
[email protected]:Sloth-Wizard/yew-test.git
cd yew-test
Then run
trunk serve
You will maybe see a warning displayed in the console telling us to convert the document
static to DOCUMENT
but this does not work for wasm_bindgen
.
Keeping document
in lowercase is important.
If you change the Typescript
, run the following to build the needed scripts so that trunk can correctly copy your new code
npm run prod-ts
The SCSS
is handeled by trunk directly