Skip to content

[pull] canary from vercel:canary - #1304

Merged
pull[bot] merged 4 commits into
code:canaryfrom
vercel:canary
Aug 14, 2026
Merged

[pull] canary from vercel:canary#1304
pull[bot] merged 4 commits into
code:canaryfrom
vercel:canary

Conversation

@pull

@pull pull Bot commented Aug 14, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

mischnic and others added 4 commits August 14, 2026 16:42
### What?

Turbopack's output-file tracer no longer fails the build when a Node.js
App Route's server-external package graph reaches a `.wasm` file.

### Why?

Since Turbopack still mapped `.wasm` / `.wat` to
`ModuleType::WebAssembly`
while tracing, the generated loader's embedded runtime helper
(`[turbopack-wasm]/node/loadWasm.ts`) got pulled into the traced file
list. `NftJsonAsset` only accepts paths under `[project]` or `[output]`,
so it raised a fatal error and `next build` never finished.

### How?

`turbopack/crates/turbopack/src/module_options/mod.rs`: map WASM sources
to `ModuleType::Raw` when `analyze_mode == AnalyzeMode::Tracing`, the
same
way `.json` and `import … with { type: "text" | "bytes" }` are already
handled for tracing. The real `.wasm` file keeps its filesystem path in
the trace; no loader or embedded helper is created. Non-tracing bundling
behavior is unchanged.

Adds `test/production/turbopack-wasm-output-tracing/`, a production
regression test that fails on the recorded baseline with

NftJsonAsset: cannot handle filepath '[turbopack-wasm]/node/loadWasm.ts'

and passes with the fix, asserting the embedded helper is absent from
the
route's `.nft.json` while the real `.wasm` file is still traced.


Closes #97338
Closes #96897

Co-authored-by: vercel-fleet[bot] <308483924+vercel-fleet[bot]@users.noreply.github.com>
> for cache invalidation

That was inaccurate.
@pull pull Bot locked and limited conversation to collaborators Aug 14, 2026
@pull pull Bot added the ⤵️ pull label Aug 14, 2026
@pull
pull Bot merged commit 0f36a7d into code:canary Aug 14, 2026
2 of 4 checks passed
@pull
pull Bot had a problem deploying to preview-builds August 14, 2026 22:50 Failure
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant