From 30786eb253549f6f48ac369d5bd070d2709e8ae8 Mon Sep 17 00:00:00 2001 From: xfy Date: Thu, 16 Jul 2026 10:07:07 +0800 Subject: [PATCH] fix(web): ship WGSL shaders to dist via trunk copy-dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bevy's HttpWasmAssetReader fetches asset paths over HTTP at runtime, requesting 'assets/shaders/*.wgsl' (matching AssetPlugin's default file_path of "assets"). Trunk only emits what index.html references, so without an explicit copy-dir link the shaders were absent from dist/ and every material hit a 404 → grey screen. Add the copy-dir link so trunk mirrors assets/ into dist/. --- web/index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/index.html b/web/index.html index 0867d3e..1417845 100644 --- a/web/index.html +++ b/web/index.html @@ -17,5 +17,11 @@ data-cargo-features="bevy/webgpu" data-wasm-opt="z" /> + +