From 0fa0546c109244bdca62b1dfd0cd7abc3da8a874 Mon Sep 17 00:00:00 2001 From: Ramon Bartl Date: Tue, 23 Jun 2026 14:44:02 +0200 Subject: [PATCH] Expose React and ReactDOM globally for SENAITE add-ons Assign window.React and window.ReactDOM via a dedicated vendor-react bundle loaded as a plain \ No newline at end of file + \ No newline at end of file diff --git a/webpack/app/resources.pt b/webpack/app/resources.pt index a53e35d395..872ab8bf25 100644 --- a/webpack/app/resources.pt +++ b/webpack/app/resources.pt @@ -1,4 +1,6 @@ + + diff --git a/webpack/app/vendor-react.js b/webpack/app/vendor-react.js new file mode 100644 index 0000000000..820b77630d --- /dev/null +++ b/webpack/app/vendor-react.js @@ -0,0 +1,18 @@ +// SENAITE shared React vendor bundle +// +// Exposes a single React/ReactDOM instance on the global scope so that +// senaite.core, its add-ons and standalone views (which do not pull in the +// core resources, e.g. senaite.impress publish views) can all consume the +// same React via Webpack externals instead of bundling their own copy. +// +// React 19 no longer ships a UMD build, so we build this tiny self-executing +// bundle ourselves. It is loaded as a plain