Skip to content

Instantly share code, notes, and snippets.

@jquense
Created August 24, 2015 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jquense/cac7caad7e6ab6844185 to your computer and use it in GitHub Desktop.
Save jquense/cac7caad7e6ab6844185 to your computer and use it in GitHub Desktop.
double react-dom
import React from 'react';
import { render, findDOMNode } from 'react-dom'
render(<div/>, document.getElementById('root'))
<html>
<head>
<title>example</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body>
<div id="root"></div>
</body>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0-beta3/react.js"></script>
<script src="bundle.js"></script>
</html>
module.exports = {
entry: path.join(__dirname, '../App.js'),
output: {
path: path.join(__dirname, '../'),
filename: 'bundle.js',
},
externals: {
react: 'React'
},
module: {
loaders: [
{ test: /\.js/, loaders: ['babel'], exclude: /node_modules/ }
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment