next.js
1adef152 - Turbopack: correctly track `await import("path")` in static analysis (#77811)

Commit
301 days ago
Turbopack: correctly track `await import("path")` in static analysis (#77811) 1. There was a problem where the module name was `"path"` in the static analyzer (and not `path`), so the lookup to the Node builtin modules list silently failed as `"\"path\"" != "path"` 2. Then, to make this actually correct, introduce `JsValue::Promise` and `JsValue::Awaited` so that `import("path")` and `await import("path")` actually are different JsValues This is correctly tracked now and includes the Wasm asset in the NFT list: ```js const { readFileSync } = await import('fs') const { join } = await import('path') const wasm = readFileSync( join(process.cwd(), '../web/lib/results/parser/biome_wasm_bg_opt.wasm') ) ``` Closes PACK-4269
Author
Parents
Loading