fix(web): ship WGSL shaders to dist via trunk copy-dir
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/.
This commit is contained in:
parent
359d2f876f
commit
30786eb253
@ -17,5 +17,11 @@
|
|||||||
data-cargo-features="bevy/webgpu"
|
data-cargo-features="bevy/webgpu"
|
||||||
data-wasm-opt="z"
|
data-wasm-opt="z"
|
||||||
/>
|
/>
|
||||||
|
<!-- Ship the WGSL shaders so Bevy's WasmAssetReader can fetch them at
|
||||||
|
runtime (it requests `assets/shaders/*.wgsl` over HTTP, matching the
|
||||||
|
default AssetPlugin file_path of "assets"). Without this the shaders
|
||||||
|
are absent from dist/ and every material loads a 404 fallback → grey
|
||||||
|
screen. -->
|
||||||
|
<link data-trunk rel="copy-dir" href="../assets" />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user