Skip to content

Instantly share code, notes, and snippets.

@zpao
Created November 17, 2015 23:33
Show Gist options
  • Save zpao/b736e79d7d40aa304a87 to your computer and use it in GitHub Desktop.
Save zpao/b736e79d7d40aa304a87 to your computer and use it in GitHub Desktop.
# Copy & Paste the commands below to build your very own bundle that exposes React, ReactDOM, ReactDOMServer
# Assumes *nix and node & npm are installed
npm install browserify react react-dom
echo "global.React = require('react');\nglobal.ReactDOM = require('react-dom');\nglobal.ReactDOMServer = require('react-dom/server');" > source.js
NODE_ENV=development ./node_modules/.bin/browserify source.js > bundle.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment