next.js
e2262334 - [turbopack] Implement improved deobfuscation for free calls and module identifiers. (#85060)

Commit
71 days ago
[turbopack] Implement improved deobfuscation for free calls and module identifiers. (#85060) Improve deobfuscation of 'imported module identifier' and attempt to deobfuscate error messages logged by the server. Before ``` ⨯ TypeError: (0 , __TURBOPACK__imported__module__$5b$project$5d2f$examples$2f$with$2d$turbopack$2f$app$2f$foo$2e$ts__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__.foo) is not a function at Page (app/page.tsx:5:6) 3 | export default function Page() { 4 | /** @ts-ignore */ > 5 | foo(); | ^ 6 | return <h1>Hello, Next.js!</h1>; 7 | } 8 | { ``` after ``` ⨯ TypeError: {imported module ./examples/with-turbopack/app/foo.ts}.foo is not a function at Page (app/page.tsx:5:6) 3 | export default function Page() { 4 | /** @ts-ignore */ > 5 | foo(); | ^ 6 | return <h1>Hello, Next.js!</h1>; 7 | } 8 | { ``` Similarly in devtools before: ![image.png](https://app.graphite.dev/user-attachments/assets/fd50d94a-d34a-4026-862e-0ca8ee6658ba.png) after ![image.png](https://app.graphite.dev/user-attachments/assets/d9080ed7-29c8-428a-831a-9bbcd818cc3e.png) This is definitely an improvement but i am not sure i put the deobfuscation logic in the best place for the console case. Happy for feedback
Author
Parents
Loading