trunk-rs / trunk

Build, bundle & ship your Rust WASM application to the web.

Home Page:https://trunkrs.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get the built app running from `dist` ?

gitmalong opened this issue · comments

So my apps works perfectly fine when spawned via trunk serve --open. So I thought I give the final build that I created with trunk build a try which places all the assets in dist.

I understood that there needs to be a webserver so I downloaded the Vscode liveserver extension but what I see is just an empty page :(

Example: https://github.com/leptos-rs/leptos/tree/main/examples/tailwind_csr_trunk

The resource http://127.0.0.1:5500/ui-d1d6efc444a9a85c_bg.wasm was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.

Seems the issue only occurs with the LiveServer extension.

python3 -m http.server --cgi 8080 worked fine