Created
October 5, 2016 01:58
-
-
Save dengjonathan/600c736ed38765e9d5c56448e2f34212 to your computer and use it in GitHub Desktop.
Webpack Config for React/ ES6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
entry: './app/index.js', | |
output: { | |
path: __dirname, | |
filename: 'bundle.js', | |
publicPath: '/app/assets/' | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /.jsx?$/, | |
loader: 'babel-loader', | |
include: path.join(__dirname, 'app'), | |
exclude: /node_modules/, | |
query: { | |
presets: ['es2015', 'react'] | |
} | |
} | |
] | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment