Skip to content

Instantly share code, notes, and snippets.

@dengjonathan
Created October 5, 2016 01:58
Show Gist options
  • Save dengjonathan/600c736ed38765e9d5c56448e2f34212 to your computer and use it in GitHub Desktop.
Save dengjonathan/600c736ed38765e9d5c56448e2f34212 to your computer and use it in GitHub Desktop.
Webpack Config for React/ ES6
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