class BugsnagSourceMapPlugin {
  apply(compiler) {
    compiler.plugin('after-emit', (compilation) => {
      this.afterEmit(compilation);
    });
  }

  afterEmit(compilation) {
  }
}

module.exports = BugsnagSourceMapPlugin;

@@ -1,8 +1,57 @@
+import async from 'async';%0Aimport fs from 'fs';%0A%0A
 class Bu
@@ -217,19 +217,412 @@
 pilation
-) %7B
+, callback) %7B%0A    const %7B assetsByChunkName %7D = compilation.getStats().toJson();%0A    const assets = this.getAssets(assetsByChunkName);%0A%0A    this.uploadSourceMaps(assets, (err) =%3E %7B%0A      callback();%0A    %7D);%0A  %7D%0A%0A  getAssets(assetsByChunkName) %7B%0A    async.filter(assetsByChunkName, (file, callback) =%3E %7B%0A      fs.accessSync(file);%0A    %7D)%0A  %7D%0A%0A  uploadSourceMaps(assets, callback) %7B%0A    callback();
 %0A  %7D%0A%7D%0A%0A

Update plugin src