Skip to content

Instantly share code, notes, and snippets.

@bngsudheer
Last active July 27, 2016 09:33
Show Gist options
  • Save bngsudheer/03b38824983f75f59b28e7118729aeea to your computer and use it in GitHub Desktop.
Save bngsudheer/03b38824983f75f59b28e7118729aeea to your computer and use it in GitHub Desktop.
Webpack config to make a build using ES6 sources
var path = require('path')
var webpack = require('webpack')
module.exports = {
entry: "./index.js",
output: {
path: __dirname,
filename: "build.js"
},
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/},
]
},
resolve: {
extensions: ['', '.js', '.jsx']
}
};
/* Remember to create .babelrc with the contents
{
"presets": ["es2015", "react"]
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment