How to use the webpack-bundle-analyzer.start function in webpack-bundle-analyzer

To help you get started, we’ve selected a few webpack-bundle-analyzer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GDJiaMi / jm-cli / src / cmds / analyze.ts View on Github external
return
    }

    if (stats.hasErrors()) {
      spinner.stopAndPersist({ text: 'Failed to compile.\n\n', symbol: logSymbols.error })
      const messages = formatMessages(stats)
      if (messages.errors.length) {
        messages.errors.forEach(e => console.log(e))
      }
      return
    }

    const port = await choosePort(8888)

    const json = stats.toJson()
    analyzer.start(json, { port })

    await fs.writeJSON(path.join(paths.appDist, 'stat.json'), json)

    spinner.stopAndPersist({ text: 'Extract successfully.', symbol: logSymbols.success })
  })
}
github heyui / hey-cli / src / task.js View on Github external
report(args) {
    let stats = require(path.join(process.cwd(), args.file));
    BundleAnalyzer(stats, {
      port: args.port
    })
  }
}

webpack-bundle-analyzer

Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap

MIT
Latest version published 7 months ago

Package Health Score

87 / 100
Full package analysis