Skip to content

Instantly share code, notes, and snippets.

@madpilot
Created December 2, 2015 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madpilot/5e0557b1ead502cf705f to your computer and use it in GitHub Desktop.
Save madpilot/5e0557b1ead502cf705f to your computer and use it in GitHub Desktop.
gulp.task('build:javascripts', function(cb) {
webpack({
entry: __dirname + '/app/frontend/javascripts/gifts.js',
output: {
path: __dirname + '/app/assets/javascripts',
filename: 'gifts.js'
},
devtool: "#source-map",
module: {
loaders: [
{
test: /\.js$/,
exlude: /node_modules/,
loader: 'babel-loader'
}
]
}
}, function(err, stats) {
if(err) {
throw new gutil.Plugin("webpack", err);
}
gutil.log("[webpack]", stats.toString());
cb();
});
});
@madpilot
Copy link
Author

madpilot commented Dec 2, 2015

.babelrc:

{
"presets": ["es2015", "react"]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment