Closed anthonyhastings closed 9 years ago
It's probably because of partition-bundle creates a writeStream for each output file, and writes to that, so it might not really work terribly great with vinyl-source-stream
... iirc it writes to the output files directly, and kind of ignores the original stream.
The ideal solution is that you would stream an object for each file that contains the filename, maybe some other meta-data and the resulting source... but I think that was rather tricky to do as browserify plugin..
I don't know, but if I do:
browserify()
.plugin(partition, {
map: __dirname + '/fixtures/package-with-browser/bundle.json',
output: dist
})
.bundle()
.on('data', function() {})
.on('end', function() { console.log('this does fire'); });
it works, but without the on('data', function() {})
it doesn't. I seems to be the same without the partion-bundle plugin.
I'm having some big problems trying to get this working when using the Browserify API rather than the command-line. Do you have any documentation on how this should be approached?
There's a few problems I'm experiencing, but the main one is that I need to use
vinyl-source-stream
in conjunction with the bundle or else it will error and fail:If I leave out the
.pipe(source())
call and the.on('end', function() { ... })
call, the process errors internally pointing at browserify:However, this error disappears if I don't use your plugin.