Skip to content

Instantly share code, notes, and snippets.

@zpao
Created April 14, 2016 17:40
Show Gist options
  • Save zpao/2b545c0fc5c2fdc8a2911fd49b8b92a4 to your computer and use it in GitHub Desktop.
Save zpao/2b545c0fc5c2fdc8a2911fd49b8b92a4 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf8">
<title>Testing</title>
</head>
<body>
<div id="container">
React will render here
</div>
<script src="./bundle.js"></script>
</body>
</html>
var React = require('react');
var ReactDOM = require('react-dom');
ReactDOM.render(
React.createElement('h1', null, 'hello world'),
document.getElementById('container')
);
{
"name": "react-env-test",
"main": "index.js",
"scripts": {
"make": "NODE_ENV=production browserify index.js | uglifyjs -c > bundle.js"
},
"dependencies": {
"browserify": "^13.0.0",
"react": "^15.0.1",
"react-dom": "^15.0.1",
"uglify-js": "^2.6.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment