Skip to content

Commit a553c6c

Browse files
Merge pull request #71 from terminusdb/fix_webpack
Fix webpack
2 parents d313a74 + 00f2194 commit a553c6c

File tree

2 files changed

+42
-28
lines changed

2 files changed

+42
-28
lines changed

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

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,26 @@ module.exports = {
6868
}
6969
]
7070
}
71-
]
72-
}
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'
7393
}

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

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,31 +71,25 @@ module.exports = {
7171
}
7272
]
7373
},
74-
/* externals: {
75-
'@terminusdb/terminusdb-client': {
76-
root: 'TerminusDBClient',
77-
commonjs2: '@terminusdb/terminusdb-client',
78-
commonjs: '@terminusdb/terminusdb-client',
79-
amd: 'TerminusDBClient',
74+
externals: {
75+
react: {
76+
root: 'React',
77+
commonjs2: 'react',
78+
commonjs: 'react',
79+
amd: 'react',
80+
},
81+
'react-dom': {
82+
root: 'ReactDOM',
83+
commonjs2: 'react-dom',
84+
commonjs: 'react-dom',
85+
amd: 'react-dom'
86+
},
87+
'prop-types': {
88+
root: 'PropTypes',
89+
commonjs2: 'prop-types',
90+
commonjs: 'prop-types',
91+
amd: 'prop-types',
92+
}
8093
},
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',
98-
}
99-
},*/
100-
//target: 'node'
94+
target: 'node'
10195
};

0 commit comments

Comments
 (0)