Re-add externalGlobals
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
"matrix-web-i18n": "^3.6.0",
|
||||
"matrix-widget-api": "^1.17.0",
|
||||
"react": "19.2.6",
|
||||
"rollup-plugin-external-globals": "^0.13.0",
|
||||
"typescript": "^6.0.0",
|
||||
"vite": "^8.0.0",
|
||||
"vite-plugin-node-polyfills": "^0.28.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",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"@vitejs/plugin-react": "^5.0.0",
|
||||
"react": "19.2.6",
|
||||
"react-dom": "19.2.6",
|
||||
"rollup-plugin-external-globals": "^0.13.0",
|
||||
"typescript": "^6.0.0",
|
||||
"vite": "^8.0.0",
|
||||
"vite-plugin-node-polyfills": "^0.28.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";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
@@ -51,5 +52,9 @@ export default defineConfig({
|
||||
nodePolyfills({
|
||||
include: ["events"],
|
||||
}),
|
||||
externalGlobals({
|
||||
// Reuse React from the host app
|
||||
react: "window.React",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"@types/react": "^19",
|
||||
"@vitejs/plugin-react": "^5.0.0",
|
||||
"react": "19.2.6",
|
||||
"rollup-plugin-external-globals": "^0.13.0",
|
||||
"typescript": "^6.0.0",
|
||||
"vite": "^8.0.0",
|
||||
"vite-plugin-node-polyfills": "^0.28.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 { importCSSSheet } from "@arcmantle/vite-plugin-import-css-sheet";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
@@ -52,5 +53,9 @@ export default defineConfig({
|
||||
nodePolyfills({
|
||||
include: ["events"],
|
||||
}),
|
||||
externalGlobals({
|
||||
// Reuse React from the host app
|
||||
react: "window.React",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
@@ -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",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user