Skip to content

Commit

Permalink
fix: CJS compatibility (#2605)
Browse files Browse the repository at this point in the history
Closes #2602
Closes #2603
  • Loading branch information
wojtekmaj authored Feb 6, 2024
1 parent 900de22 commit f7505ed
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .changeset/curly-kings-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@react-pdf/stylesheet": patch
"@react-pdf/renderer": patch
"@react-pdf/textkit": patch
"@react-pdf/layout": patch
"@react-pdf/png-js": patch
"@react-pdf/render": patch
"@react-pdf/image": patch
"@react-pdf/font": patch
"@react-pdf/fns": patch
---

fix: fix CJS compatibility
1 change: 1 addition & 0 deletions packages/fns/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import babel from '@rollup/plugin-babel';
const cjs = {
exports: 'named',
format: 'cjs',
interop: 'compat',
};

const esm = {
Expand Down
3 changes: 2 additions & 1 deletion packages/font/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import replace from '@rollup/plugin-replace';
import pkg from './package.json' assert { type: 'json' };

const cjs = {
format: 'cjs',
exports: 'named',
format: 'cjs',
interop: 'compat',
};

const esm = {
Expand Down
3 changes: 2 additions & 1 deletion packages/image/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import nodePolyfills from 'rollup-plugin-polyfill-node';
import pkg from './package.json' assert { type: 'json' };

const cjs = {
format: 'cjs',
exports: 'named',
format: 'cjs',
interop: 'compat',
};

const esm = {
Expand Down
1 change: 1 addition & 0 deletions packages/layout/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import pkg from './package.json' assert { type: 'json' };
const cjs = {
exports: 'named',
format: 'cjs',
interop: 'compat',
};

const esm = {
Expand Down
1 change: 1 addition & 0 deletions packages/png-js/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import pkg from './package.json' assert { type: 'json' };
const cjs = {
exports: 'named',
format: 'cjs',
interop: 'compat',
};

const esm = {
Expand Down
1 change: 1 addition & 0 deletions packages/render/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import pkg from './package.json' assert { type: 'json' };
const cjs = {
exports: 'named',
format: 'cjs',
interop: 'compat',
};

const esm = {
Expand Down
3 changes: 2 additions & 1 deletion packages/renderer/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import copy from 'rollup-plugin-copy';
import pkg from './package.json' assert { type: 'json' };

const cjs = {
format: 'cjs',
exports: 'named',
format: 'cjs',
interop: 'compat',
sourcemap: true,
};

Expand Down
1 change: 1 addition & 0 deletions packages/stylesheet/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import pkg from './package.json' assert { type: 'json' };
const cjs = {
exports: 'named',
format: 'cjs',
interop: 'compat',
};

const esm = {
Expand Down
3 changes: 2 additions & 1 deletion packages/textkit/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import localResolve from 'rollup-plugin-local-resolve';
import pkg from './package.json' assert { type: 'json' };

const cjs = {
format: 'cjs',
exports: 'named',
format: 'cjs',
interop: 'compat',
};

const esm = {
Expand Down

0 comments on commit f7505ed

Please sign in to comment.