Permalink
Browse files

It works!

I made a very simple mistake. I got webpack version wrong :)
  • Loading branch information...
1 parent 0e35422 commit 328ab199041e075cd1462c0cd6d3d3309fb626cd @lucapette committed Jan 23, 2017
Showing with 492 additions and 120 deletions.
  1. +1 −1 package.json
  2. +3 −3 public/index.html
  3. +9 −6 webpack.config.js
  4. +479 −110 yarn.lock
View
@@ -14,7 +14,7 @@
"babel-preset-react": "^6.22.0",
"react": "^15.4.2",
"react-dom": "^15.4.2",
- "webpack": "^1.14.0"
+ "webpack": "2"
},
"scripts": {
"start": "node_modules/.bin/webpack --config webpack.config.js"
View
@@ -1,10 +1,10 @@
<html>
<head>
- <script src="App.js" type="text/javascript"></script>
</head>
<body>
<div id="root">
- <!-- This div's content will be managed by React. Hopefully. -->
- </div>
+ <!-- This div's content will be managed by React. Hopefully. -->
+ </div>
+ <script src="App.js" type="text/javascript"></script>
</body>
</html>
View
@@ -1,17 +1,20 @@
-var path = require('path');
+var path = require("path");
const config = {
- entry: './src/App.js',
+ entry: "./src/App.js",
output: {
- path: path.resolve(__dirname, 'public'),
- filename: 'App.js'
+ path: path.resolve(__dirname, "public"),
+ filename: "App.js"
},
module: {
rules: [
{
- exclude: 'node_modules',
test: /\.(js|jsx)$/,
- use: 'babel-loader'
+ loader: 'babel-loader',
+ options: {
+ presets: ["es2015", "react"]
+ },
+ exclude: [/node_modules/]
}
]
}
Oops, something went wrong.

0 comments on commit 328ab19

Please sign in to comment.