Skip to content

Commit

Permalink
Fix Webpack externals config to support more than global variable (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
filoxo authored Jan 18, 2021
1 parent 2113e32 commit 9ffa0f0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/webpack/webpack-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,16 @@ module.exports = {
: output,

externals: {
react: 'React',
'react-dom': 'ReactDOM',
react: {
commonjs: 'react',
amd: 'react',
root: 'React',
},
'react-dom': {
commonjs: 'react-dom',
amd: 'react-dom',
root: 'ReactDOM',
},
},

resolve: {
Expand Down

0 comments on commit 9ffa0f0

Please sign in to comment.