Skip to content

Commit

Permalink
Make react-reconciler a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandernanberg committed Oct 23, 2024
1 parent abe53cd commit 7c24f14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"@react-pdf/types": "^2.7.0",
"events": "^3.3.0",
"queue": "^6.0.1",
"scheduler": "^0.25.0-rc-a26e3f403e-20240611"
"scheduler": "^0.25.0-rc-a26e3f403e-20240611",
"react-reconciler": "0.31.0-rc-a26e3f403e-20240611"
},
"peerDependencies": {
"react": "^19.0.0"
Expand All @@ -58,7 +59,6 @@
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"process": "^0.11.10",
"react-reconciler": "0.31.0-rc-a26e3f403e-20240611",
"size-limit": "^11.0.1",
"util": "^0.12.4"
}
Expand Down
20 changes: 11 additions & 9 deletions packages/renderer/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import json from '@rollup/plugin-json';
import babel from '@rollup/plugin-babel';
import nodeResolve from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import alias from '@rollup/plugin-alias';
import ignore from 'rollup-plugin-ignore';
import terser from '@rollup/plugin-terser';
import commonjs from '@rollup/plugin-commonjs';
Expand All @@ -24,20 +23,23 @@ const getExternal = ({ browser }) => [
/@babel\/runtime/,
'react/jsx-runtime',
...(browser ? [] : ['fs', 'path', 'url']),
...Object.keys(pkg.dependencies).filter(
(name) => name !== 'react-reconciler',
),
...Object.keys(pkg.dependencies),
// ...Object.keys(pkg.dependencies).filter(
// (name) => name !== 'react-reconciler',
// ),
...Object.keys(pkg.peerDependencies),
];

const getPlugins = ({ browser, declarationDests, minify = false }) => [
json(),
...(browser ? [ignore(['fs', 'path', 'url'])] : []),
alias({
entries: {
'react-reconciler': 'react-reconciler/cjs/react-reconciler.production.js',
},
}),
// alias({
// entries: {
// 'react-reconciler': 'react-reconciler/cjs/react-reconciler.production.js',
// 'react-reconciler/constants':
// 'react-reconciler/cjs/react-reconciler-constants.production.js',
// },
// }),
babel(babelConfig()),
commonjs({
esmExternals: ['scheduler'],
Expand Down

0 comments on commit 7c24f14

Please sign in to comment.