Permalink
Browse files

Added babel/webpack config

Babel works on its own but not via webpack
  • Loading branch information...
1 parent 3c0cbfc commit 0e354224adc06b44023a7be760e0e03c347d2e3c @lucapette committed Jan 23, 2017
Showing with 454 additions and 8 deletions.
  1. +1 −0 .babelrc
  2. +4 −1 package.json
  3. +9 −0 webpack.config.js
  4. +440 −7 yarn.lock
View
@@ -0,0 +1 @@
+{ "presets": ["es2015", "react"] }
View
@@ -7,13 +7,16 @@
"author": "lucapette <lucapette@gmail.com>",
"license": "MIT",
"dependencies": {
+ "babel-cli": "^6.22.2",
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
+ "babel-preset-es2015": "^6.22.0",
+ "babel-preset-react": "^6.22.0",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"webpack": "^1.14.0"
},
"scripts": {
- "start": "node_modules/.bin/webpack --config webpack.config.js"
+ "start": "node_modules/.bin/webpack --config webpack.config.js"
}
}
View
@@ -5,6 +5,15 @@ const config = {
output: {
path: path.resolve(__dirname, 'public'),
filename: 'App.js'
+ },
+ module: {
+ rules: [
+ {
+ exclude: 'node_modules',
+ test: /\.(js|jsx)$/,
+ use: 'babel-loader'
+ }
+ ]
}
}
Oops, something went wrong.

0 comments on commit 0e35422

Please sign in to comment.