Skip to content

Commit

Permalink
fix: Rollup config for xl and server-util packages (#1365)
Browse files Browse the repository at this point in the history
* Fixed rollup config for xl and server-util packages

* Small fix
  • Loading branch information
matthewlipski authored Jan 14, 2025
1 parent 1c34ed6 commit 0341242
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 8 deletions.
17 changes: 15 additions & 2 deletions packages/server-util/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => ({
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions packages/xl-docx-exporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 15 additions & 2 deletions packages/xl-docx-exporter/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => ({
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions packages/xl-multi-column/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 15 additions & 2 deletions packages/xl-multi-column/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => ({
Expand Down Expand Up @@ -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
Expand Down
17 changes: 15 additions & 2 deletions packages/xl-pdf-exporter/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => ({
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0341242

Please sign in to comment.