Skip to content

Commit cb05247

Browse files
Francesca-Bitrrooij
authored andcommitted
review webpack
1 parent d313a74 commit cb05247

File tree

2 files changed

+44
-29
lines changed

2 files changed

+44
-29
lines changed

packages/tdb-documents-ui/webpack.config.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,27 @@ module.exports = {
6868
}
6969
]
7070
}
71-
]
71+
],
72+
externals: {
73+
react: {
74+
root: 'React',
75+
commonjs2: 'react',
76+
commonjs: 'react',
77+
amd: 'react',
78+
},
79+
'react-dom': {
80+
root: 'ReactDOM',
81+
commonjs2: 'react-dom',
82+
commonjs: 'react-dom',
83+
amd: 'react-dom'
84+
},
85+
'prop-types': {
86+
root: 'PropTypes',
87+
commonjs2: 'prop-types',
88+
commonjs: 'prop-types',
89+
amd: 'prop-types',
90+
}
91+
},
92+
target: 'node'
7293
}
7394
}

packages/tdb-react-components/webpack.config.js

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -69,33 +69,27 @@ module.exports = {
6969
}
7070
]
7171
}
72-
]
73-
},
74-
/* externals: {
75-
'@terminusdb/terminusdb-client': {
76-
root: 'TerminusDBClient',
77-
commonjs2: '@terminusdb/terminusdb-client',
78-
commonjs: '@terminusdb/terminusdb-client',
79-
amd: 'TerminusDBClient',
80-
},
81-
react: {
82-
root: 'React',
83-
commonjs2: 'react',
84-
commonjs: 'react',
85-
amd: 'react',
86-
},
87-
'react-dom': {
88-
root: 'ReactDOM',
89-
commonjs2: 'react-dom',
90-
commonjs: 'react-dom',
91-
amd: 'react-dom'
92-
},
93-
'prop-types': {
94-
root: 'PropTypes',
95-
commonjs2: 'prop-types',
96-
commonjs: 'prop-types',
97-
amd: 'prop-types',
72+
],
73+
externals: {
74+
react: {
75+
root: 'React',
76+
commonjs2: 'react',
77+
commonjs: 'react',
78+
amd: 'react',
79+
},
80+
'react-dom': {
81+
root: 'ReactDOM',
82+
commonjs2: 'react-dom',
83+
commonjs: 'react-dom',
84+
amd: 'react-dom'
85+
},
86+
'prop-types': {
87+
root: 'PropTypes',
88+
commonjs2: 'prop-types',
89+
commonjs: 'prop-types',
90+
amd: 'prop-types',
91+
}
92+
},
93+
target: 'node'
9894
}
99-
},*/
100-
//target: 'node'
10195
};

0 commit comments

Comments
 (0)