Skip to content

Instantly share code, notes, and snippets.

@simplesmiler
Created September 14, 2015 20:15
Show Gist options
  • Save simplesmiler/76e30758a19f4f2650db to your computer and use it in GitHub Desktop.
Save simplesmiler/76e30758a19f4f2650db to your computer and use it in GitHub Desktop.
var env = require('broccoli-env').getEnv();
var path = require('path');
var browserify = require('broccoli-browserify-cache');
var babelify = require('babelify');
var babelifyOptions = {
nonStandard: false,
sourceMap: 'inline',
sourceMapRelative: __dirname,
compact: false, // @NOTE: let minification be done by minification tools
};
module.export = browserify('src', {
entries: [ './index.js' ],
outputFile: 'bundle.js',
browserifyOptions: {
debug: (env === 'production' ? false : true),
},
config: function(b) {
return b
.transform(babelify.configure(babelifyOptions));
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment