Re-add externalGlobals

This commit is contained in:
Michael Telatynski
2026-06-04 12:47:25 +01:00
parent 9d9991d838
commit f5d93099e3
8 changed files with 24 additions and 0 deletions
@@ -24,6 +24,7 @@
"@vitest/coverage-v8": "^4.0.0",
"react": "^19",
"typescript": "^6.0.0",
"rollup-plugin-external-globals": "^0.13.0",
"vite": "^8.0.0",
"vite-plugin-node-polyfills": "^0.28.0",
"vite-plugin-svgr": "^5.0.0",
@@ -10,6 +10,7 @@ import { fileURLToPath } from "node:url";
import { defineConfig, esmExternalRequirePlugin } from "vite";
import react from "@vitejs/plugin-react";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import externalGlobals from "rollup-plugin-external-globals";
import svgr from "vite-plugin-svgr";
import { importCSSSheet } from "@arcmantle/vite-plugin-import-css-sheet";
@@ -54,5 +55,9 @@ export default defineConfig({
nodePolyfills({
include: ["events"],
}),
externalGlobals({
// Reuse React from the host app
react: "window.React",
}),
],
});