Skip to content

Instantly share code, notes, and snippets.

@mzabriskie
Last active October 14, 2016 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzabriskie/b4c7cfe23341bb03c6ba435bfbd69ae6 to your computer and use it in GitHub Desktop.
Save mzabriskie/b4c7cfe23341bb03c6ba435bfbd69ae6 to your computer and use it in GitHub Desktop.
Webpack externals for React
// Which is the best practice for React?
// This needs to be compatible with RequireJS.
module.exports = {
externals: {
'react': 'React',
'react-dom': 'ReactDOM'
},
// - OR -
externals: {
'react': 'react',
'react-dom': 'react-dom'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment