How to use the webpack-bundle-analyzer/lib/viewer.startServer 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 learningequality / kolibri / packages / kolibri-tools / lib / bundleStats.js View on Github external
const compiler = webpack(bundle, (err, stats) => {
    if (stats.hasErrors()) {
      buildLogging.error(`There was a build error for ${bundle.name}`);
      process.exit(1);
    } else {
      const port = options.port + 1 + index;
      viewer.startServer(stats.toJson(), {
        openBrowser: false,
        port,
      });
    }
  });
  compiler.hooks.compile.tap('Process', startCallback);

webpack-bundle-analyzer

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

MIT
Latest version published 25 days ago

Package Health Score

94 / 100
Full package analysis