Skip to content

Commit

Permalink
Fix Webpack externals config to support more than global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
filoxo committed Jan 15, 2021
1 parent 0229138 commit 56bb666
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 56bb666

Please sign in to comment.