Skip to content

Commit

Permalink
require 'react-dom' when using 'require' and use window.ReactDOM with…
Browse files Browse the repository at this point in the history
… globals
  • Loading branch information
ryankshaw authored Oct 14, 2016
1 parent 183931c commit fa7dc51
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions webpack.build.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,24 @@ module.exports = {
libraryTarget: 'umd'
},
externals: {
'react': 'React',
'react/addons': 'React',
'react-dom': 'ReactDOM'
'react': {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
},
'react-dom': {
root: 'ReactDOM',
commonjs2: 'react-dom',
commonjs: 'react-dom',
amd: 'react-dom'
},
'react/addons': {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
}
},
module: {
loaders: [
Expand Down

0 comments on commit fa7dc51

Please sign in to comment.