Skip to content

Commit

Permalink
fix(build): Fix requiring React as external dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchin committed Mar 30, 2017
1 parent 57d3a8f commit 903eadb
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,20 @@ const webpackConfig = {
modules: ['node_modules'],
extensions: ['.js', '.jsx'],
},
externals: ['react', 'react-dom'],
externals: {
react: {
amd: 'react',
commonjs: 'react',
commonjs2: 'react',
root: 'React',
},
'react-dom': {
amd: 'react-dom',
commonjs: 'react-dom',
commonjs2: 'react-dom',
root: 'ReactDOM',
},
},
};

export default webpackConfig;

0 comments on commit 903eadb

Please sign in to comment.