Skip to content

Instantly share code, notes, and snippets.

@mashiro
Last active August 29, 2015 14:22
Show Gist options
  • Select an option

  • Save mashiro/18036ca0090bc5a7a058 to your computer and use it in GitHub Desktop.

Select an option

Save mashiro/18036ca0090bc5a7a058 to your computer and use it in GitHub Desktop.
var config = {
addVendor: function(name, path, loaders) {
this.resolve.alias[name] = path;
if (loaders) {
this.module.loaders.push({test: new RegExp(path), loaders: loaders});
}
}
...
};
config.addVendor('jquery', 'jquery/dist/jquery.js');
config.addVendor('bootstrap', 'bootstrap-sass/assets/javascripts/bootstrap.js', ['imports?jQuery=jquery']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment