diff --git a/packages/server-util/vite.config.ts b/packages/server-util/vite.config.ts index 940749ef1..c134c61e5 100644 --- a/packages/server-util/vite.config.ts +++ b/packages/server-util/vite.config.ts @@ -4,7 +4,11 @@ import { defineConfig } from "vite"; import pkg from "./package.json"; // import eslintPlugin from "vite-plugin-eslint"; -const deps = Object.keys(pkg.dependencies); +const deps = Object.keys({ + ...pkg.dependencies, + ...pkg.peerDependencies, + ...pkg.devDependencies, +}); // https://vitejs.dev/config/ export default defineConfig((conf) => ({ @@ -37,7 +41,16 @@ export default defineConfig((conf) => ({ if (deps.includes(source)) { return true; } - return source.startsWith("prosemirror-"); + + if (source === "react/jsx-runtime") { + return true; + } + + if (source.startsWith("prosemirror-")) { + return true; + } + + return false; }, output: { // Provide global variables to use in the UMD build diff --git a/packages/xl-docx-exporter/package.json b/packages/xl-docx-exporter/package.json index 6a088a1db..ce7399565 100644 --- a/packages/xl-docx-exporter/package.json +++ b/packages/xl-docx-exporter/package.json @@ -67,6 +67,10 @@ "vitest": "^2.0.3", "xml-formatter": "^3.6.3" }, + "peerDependencies": { + "react": "^18.0 || ^19.0 || >= 19.0.0-rc", + "react-dom": "^18.0 || ^19.0 || >= 19.0.0-rc" + }, "eslintConfig": { "extends": [ "../../.eslintrc.js" diff --git a/packages/xl-docx-exporter/vite.config.ts b/packages/xl-docx-exporter/vite.config.ts index b17d4637b..bf5628428 100644 --- a/packages/xl-docx-exporter/vite.config.ts +++ b/packages/xl-docx-exporter/vite.config.ts @@ -4,7 +4,11 @@ import { defineConfig } from "vite"; import pkg from "./package.json"; // import eslintPlugin from "vite-plugin-eslint"; -const deps = Object.keys(pkg.dependencies); +const deps = Object.keys({ + ...pkg.dependencies, + ...pkg.peerDependencies, + ...pkg.devDependencies, +}); // https://vitejs.dev/config/ export default defineConfig((conf) => ({ @@ -46,7 +50,16 @@ export default defineConfig((conf) => ({ if (deps.includes(source)) { return true; } - return source.startsWith("prosemirror-"); + + if (source === "react/jsx-runtime") { + return true; + } + + if (source.startsWith("prosemirror-")) { + return true; + } + + return false; }, output: { // Provide global variables to use in the UMD build diff --git a/packages/xl-multi-column/package.json b/packages/xl-multi-column/package.json index a0906d5f6..f0a7d607c 100644 --- a/packages/xl-multi-column/package.json +++ b/packages/xl-multi-column/package.json @@ -67,6 +67,10 @@ "vite-plugin-eslint": "^1.8.1", "vitest": "^2.0.3" }, + "peerDependencies": { + "react": "^18.0 || ^19.0 || >= 19.0.0-rc", + "react-dom": "^18.0 || ^19.0 || >= 19.0.0-rc" + }, "eslintConfig": { "extends": [ "../../.eslintrc.js" diff --git a/packages/xl-multi-column/vite.config.ts b/packages/xl-multi-column/vite.config.ts index 4aa18f671..d82b5b09a 100644 --- a/packages/xl-multi-column/vite.config.ts +++ b/packages/xl-multi-column/vite.config.ts @@ -4,7 +4,11 @@ import { defineConfig } from "vite"; import pkg from "./package.json"; // import eslintPlugin from "vite-plugin-eslint"; -const deps = Object.keys(pkg.dependencies); +const deps = Object.keys({ + ...pkg.dependencies, + ...pkg.peerDependencies, + ...pkg.devDependencies, +}); // https://vitejs.dev/config/ export default defineConfig((conf) => ({ @@ -36,7 +40,16 @@ export default defineConfig((conf) => ({ if (deps.includes(source)) { return true; } - return source.startsWith("prosemirror-"); + + if (source === "react/jsx-runtime") { + return true; + } + + if (source.startsWith("prosemirror-")) { + return true; + } + + return false; }, output: { // Provide global variables to use in the UMD build diff --git a/packages/xl-pdf-exporter/vite.config.ts b/packages/xl-pdf-exporter/vite.config.ts index 66eb3bb58..721e92d22 100644 --- a/packages/xl-pdf-exporter/vite.config.ts +++ b/packages/xl-pdf-exporter/vite.config.ts @@ -4,7 +4,11 @@ import { defineConfig } from "vite"; import pkg from "./package.json"; // import eslintPlugin from "vite-plugin-eslint"; -const deps = Object.keys(pkg.dependencies); +const deps = Object.keys({ + ...pkg.dependencies, + ...pkg.peerDependencies, + ...pkg.devDependencies, +}); // https://vitejs.dev/config/ export default defineConfig((conf) => ({ @@ -53,7 +57,16 @@ export default defineConfig((conf) => ({ if (deps.includes(source)) { return true; } - return source.startsWith("prosemirror-"); + + if (source === "react/jsx-runtime") { + return true; + } + + if (source.startsWith("prosemirror-")) { + return true; + } + + return false; }, output: { // Provide global variables to use in the UMD build