@@ -116,14 +116,28 @@ Since rewire relies heavily on node's require mechanism it can't be used on the
116116###browserify
117117
118118``` javascript
119- var b= browserify ();
119+ var b= browserify (),
120+ bundleSrc;
121+
122+ // Add rewire as browserify middleware
123+ // @see https://github.com/substack/node-browserify/blob/master/doc/methods.markdown#busefn
120124b .use (require (" rewire" ).bundlers .browserify );
125+
126+ b .addEntry (" entry.js" );
127+ bundleSrc= b .bundle ();
121128```
122129
123130###webpack
124131
125132``` javascript
126- var options= {};
133+ var webpackOptions= {
134+ output: " bundle.js"
135+ };
136+
137+ // This function modifies the webpack options object.
138+ // It adds a postLoader and postProcessor to the bundling process.
139+ // @see https://github.com/webpack/webpack#programmatically-usage
140+ require (" rewire" ).bundlers .webpack (webpackOptions);
127141
128- require ( " rewire " ). bundlers . webpack (options );
142+ webpack ( " entry.js " , webpackOptions, function () {} );
129143```