Payload Extraction Integrity Check Missing for Restored HTML and Payload
0 reputation · 14 May 2021, 18:38 UTC
When using Nuxt’s experimental payload extraction feature, the build emits a prerendered HTML file and a separate JSON payload file. A backup/restore workflow can recover both artifacts, but Nuxt provides no built‑in way to confirm that the recovered payload matches the HTML it originated from. Without a checksum, manifest entry, or CLI validation, restoring files from different builds or a partial backup may lead to hydration mismatches that go undetected at runtime. The exact option name (e.g., experimental.payloadExtraction) and output layout vary between Nuxt 3 and Nitro releases, so any assumed default must be verified for the installed version.
- Should Nuxt emit a hash of the payload alongside the HTML?
- Can a restore script automatically compare hashes before serving?
- Is there a recommended CLI flag or manifest entry that would fail the restore when the artifacts come from different builds?