I need to modify content in some nested require file so it is not possible to do it on prebundle event as I see only var myModule = require('myModule'). I was wondering if it's possible to replace some text in the bundle after the content was browserified (postbundle or similar):
browserify: {
paths: 'myPath',
extensions: ['.js', '.html'],
configure: function (bundle) {
bundle.on('bundled', function () {
// Here I would like on postbundle or bundled event to replace
// some content in generated bundled file and then it pass back to karma
});
}
}
I need to modify content in some nested require file so it is not possible to do it on prebundle event as I see only
var myModule = require('myModule')
. I was wondering if it's possible to replace some text in the bundle after the content was browserified (postbundle or similar):