Currently there doesn't seem to be any (simple) way to detect which files have been written to disk.
It seems like stats.compilation.assets[].emitted is set to true even for files that haven't changed, so we can't reliably use that.
Instead, I'm relying on the same code this plugin uses to detect if a file has been skipped or not, but that seem unreliable as it relies on being in sync with this plugin and does extra work for nothing.
I'm not sure if this is a viable solution or if there's a better way to accomplish this, but would triggering an event, with the list of written files be something you see as an acceptable solution ? I was thinking something along the lines of calling compiler.applyPlugins('write-file-webpack-plugin-files-written', writtenFiles) after loop through the assets where writtenFiles is an array of the ... written files. We could then hook into the event programatically and do whatever with the files.
If you'd like and see a need for such event, I can submit a PR doing just that.
Currently there doesn't seem to be any (simple) way to detect which files have been written to disk.
It seems like
stats.compilation.assets[].emitted
is set to true even for files that haven't changed, so we can't reliably use that.Instead, I'm relying on the same code this plugin uses to detect if a file has been skipped or not, but that seem unreliable as it relies on being in sync with this plugin and does extra work for nothing.
I'm not sure if this is a viable solution or if there's a better way to accomplish this, but would triggering an event, with the list of written files be something you see as an acceptable solution ? I was thinking something along the lines of calling
compiler.applyPlugins('write-file-webpack-plugin-files-written', writtenFiles)
after loop through the assets wherewrittenFiles
is an array of the ... written files. We could then hook into the event programatically and do whatever with the files.If you'd like and see a need for such event, I can submit a PR doing just that.