jadami10 opened a new pull request, #19109:
URL: https://github.com/apache/pinot/pull/19109

   The Status diff modal for BAD/UPDATING tables renders `<ReactDiffViewer/>`. 
`[email protected]` is a Babel CJS module (`__esModule=true`, 
`exports.default = DiffViewer`), but the Vite build forced 
`commonjsOptions.defaultIsModuleExports: true`, making the default import 
resolve to the whole `module.exports` object instead of `.default`. Rendering 
that object as an element threw React error #130 ("got: object"). This only 
reproduced in the production build; dev worked because optimizeDeps pre-bundles 
the package via esbuild's `__esModule`-aware interop.
   
   Set `defaultIsModuleExports` to `'auto'` so the default import honors 
`__esModule`/`exports.default`, matching the esbuild interop used in dev. 
Plain-CJS default imports (no `__esModule`) are unaffected.
   
   I relied on claude for this fix since I don't understand the vite build 
stuff well. But I tested it against our internal QA where opening the "diff 
viewer" for segment status was breaking, and this indeed fixed it. And 
generally navigating through the UI is unbroken.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to