gulp-browserify-protect
protect your browserify bundle from other module loaders using the global namespace
Getting Started
Install the module with: npm install --save-dev gulp-browserify-protect
var browserifyProtect = ; gulp;
This adds
window_require = windowrequire;windowrequire = undefined;window_define = windowdefine;windowdefine = undefined; // browersified bundle goes here windowrequire = window_require;windowdefine = window_define;
to your browserify bundle.
why?
I have found this useful for embedding code on a page that uses a legacy module loder such as require.js
License
Copyright (c) 2014 Matthew Conlen. Licensed under the MIT license.