fix(build): fix trunk output path and disable file hashing

Set dist=target/site/pkg so trunk outputs WASM alongside where Axum
serves /pkg/. Disable filehash so HydrationScripts can resolve
rust-ipam.js and rust-ipam_bg.wasm without content hash suffixes.
Add data-target-name to index.html to disambiguate lib from bin target.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-15 19:35:16 +02:00
parent acaa121658
commit 18134d6f4b
2 changed files with 20 additions and 10 deletions

View File

@@ -9,6 +9,12 @@
- Il injecte les balises <script> pour charger le bundle WebAssembly
Ne pas ajouter ces balises manuellement ici — trunk le fait pour vous.
-->
<!--
Indique à trunk de compiler le target "lib" (cdylib → WASM)
et non le binaire "rust-ipam" (qui lui est le serveur Axum).
data-target-name correspond au nom du crate avec underscores (convention Rust).
-->
<link data-trunk rel="rust" data-target-name="rust_ipam" />
</head>
<body>
<!--