How to use rollup-plugin-analyzer - 3 common examples

To help you get started, we’ve selected a few rollup-plugin-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 denoland / deno / rollup.config.js View on Github external
typescript,

        // By default, the include path only includes the cwd and below, need to include the root of the project
        // and build path to be passed to this plugin.  This is different front tsconfig.json include
        include: ["*.ts", `${__dirname}/**/*.ts`, `${process.cwd()}/**/*.ts`],

        // d.ts files are not bundled and by default like include, it only includes the cwd and below
        exclude: [
          "*.d.ts",
          `${__dirname}/**/*.d.ts`,
          `${process.cwd()}/**/*.d.ts`
        ]
      }),

      // Provide some concise information about the bundle
      analyze({
        skipFormatted: true,
        onAnalysis({
          bundleSize,
          bundleOrigSize,
          bundleReduction,
          moduleCount
        }) {
          if (!commandOptions.silent) {
            console.log(
              `Bundle size: ${Math.round((bundleSize / 1000000) * 100) / 100}Mb`
            );
            console.log(
              `Original size: ${Math.round((bundleOrigSize / 1000000) * 100) /
                100}Mb`
            );
            console.log(`Reduction: ${bundleReduction}%`);
github CanopyTax / single-spa / rollup.config.js View on Github external
},
  {
    input: './src/single-spa.js',
    output: {
      file: `./lib/system/single-spa${isProduction ? ".min" : ".dev"}.js`,
      format: 'system',
      sourcemap: true,
    },
    plugins: [
      resolve(),
      commonjs(),
      babel({
        exclude: 'node_modules/**'
      }),
      isProduction && (await import('rollup-plugin-terser')).terser(),
      useAnalyzer && analyzer()
    ]
  },
]))()
github akeneo / pim-community-dev / akeneo-design-system / rollup.config.js View on Github external
const rollUpConf = args => {
    if (args['config-analyze']) {
        plugins.push(
            analyze({
                showExports: true,
                summaryOnly: true,
            })
        );
    }
    return {
        input: 'src/index.ts',
        output: [
            {
                file: pkg.main,
                format: 'es',
                exports: 'named',
                sourcemap: true,
            },
        ],
        watch: {

rollup-plugin-analyzer

Mad metrics for your rollup bundles, know all the things

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis

Popular rollup-plugin-analyzer functions