diff --git a/index.html b/index.html index 2c0189b..97d39a5 100644 --- a/index.html +++ b/index.html @@ -3,9 +3,10 @@ -

The App

+
+ diff --git a/js/index.js b/js/index.js index 74507a7..64fb017 100644 --- a/js/index.js +++ b/js/index.js @@ -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( +

Hello, world!

, + document.querySelector('main') +); diff --git a/package.json b/package.json index 39e0893..457dcc4 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/webpack.config.js b/webpack.config.js index 1f8851a..ee77ba6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,7 +10,7 @@ module.exports = { use: { loader: 'babel-loader', options: { - presets: ["es2015"] + presets: ["es2015", "react"] } } }