next.js
3b020d4b - Turbopack: normalize ref type for external tracing (#78226)

Commit
1 year ago
Turbopack: normalize ref type for external tracing (#78226) Fixes duplicate `CachedExternalModule`s, due to different result depending on the reference type: As opposed to adding the whole reference type to the external's `AssetIdent`, normalize the reference type, tracing an external with `EcmaScriptModules(ImportPart(Evaluation))` (which returns nothing for side-effect-free packages) is strange anyway. ``` request: "@emotion/react" reference_type: EcmaScriptModules(ImportPart(Evaluation)) tracing_resolve_result: [] tracing_resolve_affecting: ["[project]/node_modules/.pnpm/@emotion+react@11.11.1_@types+react@19.1.1_react@19.2.0-canary-1d6c8168-20250411/node_modules/@emotion/react/package.json", "[project]/node_modules/@emotion/react"] ``` ``` request: "@emotion/react" reference_type: EcmaScriptModules(ImportPart(Export("CacheProvider"))) tracing_resolve_result: ["[project]/node_modules/.pnpm/@emotion+react@11.11.1_@types+react@19.1.1_react@19.2.0-canary-1d6c8168-20250411/node_modules/@emotion/react/dist/emotion-react.cjs.mjs [externals-tracing] (ecmascript)"] tracing_resolve_affecting: ["[project]/node_modules/.pnpm/@emotion+react@11.11.1_@types+react@19.1.1_react@19.2.0-canary-1d6c8168-20250411/node_modules/@emotion/react/package.json", "[project]/node_modules/@emotion/react"] ```
Author
Parents
Loading