You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assume this is to avoid the need for source maps.
Currently we don't have ability in oxc_codegen to retain same lines in output, so I guess we would need to either:
Add that ability to oxc_codegen (probably not easy). or
Do this transform using string manipulation (magic string). or
Do transform via AST manipulation and generate source map.
Whether option (2) is a viable approach depends on whether this transform needs to run in concert with other transforms, or whether it always runs alone.
Broader thought: If best approach is magic string manipulation, there's an argument that this shouldn't be in Oxc transformer at all. It'd work completely differently from all the other transforms, and might be better considered a Rolldown thing.
Port from
https://github.com/vitejs/vite/blob/00deea4ff88e30e299cb40a801b5dc0205ac913d/packages/vite/src/node/ssr/ssrTransform.ts
Tests at https://github.com/vitejs/vite/blob/00deea4ff88e30e299cb40a801b5dc0205ac913d/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts
The text was updated successfully, but these errors were encountered: