This is an automated email from the ASF dual-hosted git repository.

Jackie-Jiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new fc125943a55 Fix /tables status diff viewer crash (React error #130) 
(#19109)
fc125943a55 is described below

commit fc125943a55e8f420404ee8305135d00a1acadc1
Author: Johan Adami <[email protected]>
AuthorDate: Tue Jul 28 15:02:01 2026 -0400

    Fix /tables status diff viewer crash (React error #130) (#19109)
---
 pinot-controller/src/main/resources/vite.config.ts | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/pinot-controller/src/main/resources/vite.config.ts 
b/pinot-controller/src/main/resources/vite.config.ts
index ff6bc6912b8..32ffa82bb73 100644
--- a/pinot-controller/src/main/resources/vite.config.ts
+++ b/pinot-controller/src/main/resources/vite.config.ts
@@ -114,7 +114,15 @@ export default defineConfig(({ mode }) => {
         transformMixedEsModules: true,
         // Ensure CommonJS modules are properly handled
         include: [/node_modules/],
-        defaultIsModuleExports: true,
+        // Use 'auto' (the plugin default) so the default import honors a CJS
+        // module's `__esModule`/`exports.default` marker. Forcing `true` here
+        // made `import X from 'cjs-pkg'` resolve to the entire module.exports
+        // object for Babel-compiled packages like `react-diff-viewer` (which
+        // sets `__esModule` and `exports.default = DiffViewer`). Rendering 
that
+        // object as a component crashed the /tables status diff viewer with
+        // React error #130 ("Element type is invalid ... got: object"). 'auto'
+        // matches the esbuild interop used by optimizeDeps in dev.
+        defaultIsModuleExports: 'auto',
       },
     },
 


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

Reply via email to