How to use speed-measure-webpack-plugin - 4 common examples

To help you get started, weโ€™ve selected a few speed-measure-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 senntyou / lila / packages / lila-webpack-config / src / build.js View on Github external
const { getSettings } = lila;
  const [root, srcDir, buildDir] = getSettings(['root', 'src', 'build']);
  const srcPath = join(root, srcDir);
  const buildPath = join(root, buildDir);

  const {
    staticServer = '',
    minCss = !0,
    splitChunks = defaultSplitChunks,
  } = config;

  const baseConfig = base(lila, webpack, { entry, cmd, config });

  baseConfig.plugins.push(
    new WebpackBar(),
    new SpeedMeasurePlugin(),
    // css standalone
    new MiniCssExtractPlugin({
      filename: '[chunkhash].css',
    })
  );

  baseConfig.optimization.splitChunks = splitChunks;

  if (minCss)
    baseConfig.plugins.push(
      new OptimizeCssAssetsPlugin({
        cssProcessorPluginOptions: {
          preset: ['default', { discardComments: { removeAll: true } }],
        },
      })
    );
github senntyou / lila / packages / lila-webpack-lib-config / src / build.js View on Github external
const { BannerPlugin } = webpack;

  const {
    minCss = !0,
    filename = '',
    library = 'Index',
    banner = '',
    externals,
  } = config;

  const baseConfig = base(lila, webpack, { entry, cmd, config });

  baseConfig.plugins.push(
    new WebpackBar(),
    new SpeedMeasurePlugin(),
    // css standalone
    new MiniCssExtractPlugin({
      filename: `${filename || 'style'}.css`,
    })
  );

  if (minCss)
    baseConfig.plugins.push(
      new OptimizeCssAssetsPlugin({
        cssProcessorPluginOptions: {
          preset: ['default', { discardComments: { removeAll: true } }],
        },
      })
    );

  if (banner) baseConfig.plugins.push(new BannerPlugin(banner));
github sevenwestmedia / project-watchtower / lib / bin / build.ts View on Github external
export function smp(buildConfig: BuildConfig, webpackConfig: webpack.Configuration) {
    const smpPlugin = new SpeedMeasurePlugin()
    return buildConfig.SMP ? smpPlugin.wrap(webpackConfig) : webpackConfig
}
github senntyou / lila / packages / lila-webpack-config / src / analyze.js View on Github external
export default (lila, webpack, { entry, cmd, config }) => {
  const { getSettings } = lila;
  const [root, srcDir, tmpDir, analyzeDir = 'analyze'] = getSettings([
    'root',
    'src',
    'tmp',
    'analyze',
  ]);
  const srcPath = join(root, srcDir);
  const analyzePath = join(root, tmpDir, analyzeDir);

  const baseConfig = base(lila, webpack, { entry, cmd, config });

  baseConfig.plugins.push(new WebpackBar(), new SpeedMeasurePlugin());

  return {
    entry: `${srcPath}/${entry === defaultEntry ? '' : `${entry}/`}index.js`,
    output: {
      path: analyzePath,
      filename: 'index.js',
    },
    ...baseConfig,
  };
};

speed-measure-webpack-plugin

Measure + analyse the speed of your webpack loaders and plugins

MIT
Latest version published 4 years ago

Package Health Score

73 / 100
Full package analysis

Popular speed-measure-webpack-plugin functions

Similar packages