Webpack on the Packaging of react components

desired effect

the react components developed by ourselves do not want to introduce react, when they are packaged, but want to introduce react externally

.

clipboard.png

react

webpack.config.js

clipboard.png

clipboard.png
report that react is not defined

so the above react does not refer to the global.

complete project address

https://github.com/951565664/. testExternals branch


1, try 'react':' window.React'
2, and make sure that the react.js file loads


before the packaged js file in html. I didn't change anything. For the time being, this question has been turned off

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2c5ff-2bb3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2c5ff-2bb3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?