Skip to content

Commit

Permalink
It works!
Browse files Browse the repository at this point in the history
I made a very simple mistake. I got webpack version wrong :)
  • Loading branch information
lucapette committed Jan 23, 2017
1 parent 0e35422 commit 328ab19
Show file tree
Hide file tree
Showing 4 changed files with 492 additions and 120 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions public/index.html
@@ -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>
15 changes: 9 additions & 6 deletions webpack.config.js
@@ -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/]
}
]
}
Expand Down

0 comments on commit 328ab19

Please sign in to comment.