Created
August 24, 2015 20:00
-
-
Save jquense/cac7caad7e6ab6844185 to your computer and use it in GitHub Desktop.
double react-dom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { render, findDOMNode } from 'react-dom' | |
render(<div/>, document.getElementById('root')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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