How to use bundle-stats-webpack-plugin - 2 common examples

To help you get started, we’ve selected a few bundle-stats-webpack-plugin 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 relative-ci / bundle-stats / packages / gatsby-plugin / gatsby-node.js View on Github external
exports.onCreateWebpackConfig = ({ stage, actions }, options) => {
  if (stage === 'build-javascript') {
    actions.setWebpackConfig({
      plugins: [
        new BundleStatsWebpackPlugin(options),
      ],
    });
  }
};
github relative-ci / bundle-stats / packages / next-plugin / index.js View on Github external
throw new Error(
        'This plugin is not compatible with Next.js versions below 5.0.0 https://err.sh/next-plugins/upgrade',
      );
    }

    const { dev, isServer } = options;

    if (dev || isServer) {
      return config;
    }

    return {
      ...config,
      plugins: [
        ...config.plugins,
        new BundleStatsWebpackPlugin(pluginOptions),
      ],
    };
  },
});

bundle-stats-webpack-plugin

In-depth bundle analyzer for webpack(bundle size, assets, modules, packages)

MIT
Latest version published 7 days ago

Package Health Score

84 / 100
Full package analysis

Popular bundle-stats-webpack-plugin functions