I\'m using Browserify
to bundle a ReactJS
application.
All my components include a require(\"react\")
at the top. This causes
I also wanted to do this, and found a possible solution.
From the browserify -h
help:
--ignore, -i Replace a file with an empty stub. Files can be globs.
Just use the ignore feature.
browserify -i react -i react-dom ...
I also added react and react-dom as peer dependencies, cause in my case, the package can be imported in other packages builds.