Closed ypt closed 8 years ago
Could this be merged? Pretty handy to have it in master.
+1
Right now you can specify opts.outputs
as a function, and thus no need to plugin factor-bundle
each time reset
.
I have tried some way to use watchify with factor-bundle, no memory leak detected.
I think plugging factor-bundle
repeatedly seems a little odd, because reset
only rebuild the pipeline, and all other plugins are plugged only once.
@zoubin you are correct i tired it out by moving factor-bundle
outside of my re-bundling method and it works therefore this fix is un-needed at least for me as well.
my simple setup using browserify-incremental + chokidar
var bundleStream = browserifyInc(files, {
cache: {},
packageCache: {},
fullPaths: true,
cacheFile: 'browserify-cache.json'
}).plugin('factor-bundle', {
outputs: outputFiles
});
var bundleScripts = function bundleScripts() {
bundleStream
.bundle()
.pipe(fs.createWriteStream('./client/dist/js/common.js'));
};
I think this may be my issue as well.
Alright, it sounds like this fix isn't really necessary, and @zoubin and @davidchase have solutions. I'll close this PR.
Implemented the fix for #64 suggested by @Freyert