code: function getBundlePath(stats: Stats): string {
    const mainAssets = stats.toJson().assetsByChunkName.main;
    return path.resolve(
      stats.compilation.compiler.outputPath,
      Array.isArray(mainAssets) ? mainAssets[0] : mainAssets
    );
  }
docs: Get the absolute path to the main JS bundle on disk.