Skip to content

Instantly share code, notes, and snippets.

@revolunet
Last active January 9, 2018 15:18
Show Gist options
  • Save revolunet/6905b139cc63219df926 to your computer and use it in GitHub Desktop.
Save revolunet/6905b139cc63219df926 to your computer and use it in GitHub Desktop.
Sample split grunt-browserify config for vendors + applications files with react
var externalModules = [
'fs',
'events',
'react',
'react-addons',
'lodash'
];
module.exports = {
vendors: {
src: ['.'],
dest: 'js/vendors.js',
options: {
debug: true,
alias: externalModules.map(function(module) {
return module + ':';
}),
external: null
}
},
dev: {
options: {
transform: ['reactify', 'brfs'],
debug: true,
external: externalModules
},
files: {
'js/bundle.js': ['src/app.jsx'],
}
}
};
@younes0
Copy link

younes0 commented Jun 24, 2016

Merci monsieur

@andyexeter
Copy link

Thank you :)

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