react working

master startingreact
Matt Huntington 9 years ago
parent f6942f17ee
commit bb91821de6

@ -3,9 +3,10 @@
<head>
<meta charset="utf-8">
<title></title>
<script src="dist/bundle.js" charset="utf-8"></script>
</head>
<body>
<h1>The App</h1>
<main></main>
<script src="dist/bundle.js" charset="utf-8"></script>
</body>
</html>

@ -1,8 +1,7 @@
import asdf, {myFunc2 as wee, Foo} from './mylib.js'
import ReactDOM from 'react-dom';
import React from 'react';
var a = new Foo();
a.bar();
asdf();
wee();
console.log('awesome');
ReactDOM.render(
<h1 className="foo">Hello, world!</h1>,
document.querySelector('main')
);

@ -20,6 +20,9 @@
"babel-core": "^6.24.1",
"babel-loader": "^7.0.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"webpack": "^2.4.1"
}
}

@ -10,7 +10,7 @@ module.exports = {
use: {
loader: 'babel-loader',
options: {
presets: ["es2015"]
presets: ["es2015", "react"]
}
}
}

Loading…
Cancel
Save