Created
August 27, 2016 06:06
-
-
Save delacruz-dev/27ced152785c3aefdc37fb7259fd896f to your computer and use it in GitHub Desktop.
This webpack configuration resolves the warning of having two different instances of React when working with npm linked modules which has React themselves as a dependency
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
resolve: { | |
alias: { | |
react: path.resolve('./node_modules/react') | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This webpack configuration resolves the warning of having two different instances of React when working with npm linked modules which has React themselves as a dependency.
Add this in your parent component's webpack config and you'll force npm to resolve react in its own node_modules folder.
Kudos: http://stackoverflow.com/questions/31169760/how-to-avoid-react-loading-twice-with-webpack-when-developing