@@ -27,6 +27,9 @@ const esm = {
2727const getCJS = override => Object . assign ( { } , cjs , override ) ;
2828const getESM = override => Object . assign ( { } , esm , override ) ;
2929
30+ const nodeInput = './src/node/index.js' ;
31+ const domInput = './src/dom/index.js' ;
32+
3033const babelConfig = ( { browser } ) => ( {
3134 babelrc : false ,
3235 exclude : 'node_modules/**' ,
@@ -50,8 +53,6 @@ const babelConfig = ({ browser }) => ({
5053 ] ,
5154} ) ;
5255
53- const input = './src/node/index.js' ;
54-
5556const getExternal = ( { browser } ) => [
5657 '@babel/runtime/helpers/extends' ,
5758 '@babel/runtime/helpers/objectWithoutPropertiesLoose' ,
@@ -81,7 +82,7 @@ const getPlugins = ({ browser, minify = false }) => [
8182] ;
8283
8384const serverConfig = {
84- input,
85+ input : nodeInput ,
8586 output : [
8687 getESM ( { file : 'lib/react-pdf.es.js' } ) ,
8788 getCJS ( { file : 'lib/react-pdf.cjs.js' } ) ,
@@ -91,7 +92,7 @@ const serverConfig = {
9192} ;
9293
9394const serverProdConfig = {
94- input,
95+ input : nodeInput ,
9596 output : [
9697 getESM ( { file : 'lib/react-pdf.es.min.js' } ) ,
9798 getCJS ( { file : 'lib/react-pdf.cjs.min.js' } ) ,
@@ -101,7 +102,7 @@ const serverProdConfig = {
101102} ;
102103
103104const browserConfig = {
104- input,
105+ input : domInput ,
105106 output : [
106107 getESM ( { file : 'lib/react-pdf.browser.es.js' } ) ,
107108 getCJS ( { file : 'lib/react-pdf.browser.cjs.js' } ) ,
@@ -111,7 +112,7 @@ const browserConfig = {
111112} ;
112113
113114const browserProdConfig = {
114- input,
115+ input : domInput ,
115116 output : [
116117 getESM ( { file : 'lib/react-pdf.browser.es.min.js' } ) ,
117118 getCJS ( { file : 'lib/react-pdf.browser.cjs.min.js' } ) ,
0 commit comments