concat
concat copied to clipboard
Promise resolves before file is finished writing
Hi, please change it so that the concat Promise doesn't resolve until the file saving is finished. When I load the combined file after then() is called, it sporadically causes an error because the file is not there yet. This package therefore cannot be used to reliable read the file after concatenation.
Tested on Mac in a Node Webpack build pipeline.
concat( [ part1.js, part2.js' ], combined.js ).then( resolve('While the combined result is available here in variable result, combined.js is not always finished being saved to disk.') )
I ran into this problem as well when upgrading to latest nodejs version.