How to use rollup-plugin-sizes - 5 common examples

To help you get started, we’ve selected a few rollup-plugin-sizes 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 wangpin34 / vue-scroll / build / configs.js View on Github external
function genConfig (opts) {
  const config = {
    input: {
      input: resolve('src/index.js'),
      plugins: [
        flow(), // Remove flow type
        node(),
        cjs(),
        replace({
          __VERSION__: version
        }),
        buble(),
        sizes(),
        cleanup(),
        strip({
          // set this to `false` if you don't want to
          // remove debugger statements
          debugger: true,

          // defaults to `[ 'console.*', 'assert.*' ]`
          functions: [ 'console.log', 'assert.*', 'debug', 'alert' ],

          // set this to `false` if you're not using sourcemaps –
          // defaults to `true`
          sourceMap: true
        })
      ]
    },
    output: {
github torchbox / design-in-browser-bootstrap / rollup.config.js View on Github external
plugins     : [
        resolve({
            jsnext: true,
            main: true,
            browser: true,
        }),
        commonjs(),
        babel(),
    ]
};

// Add Production or Development settings to the config object
if(process.env.production){
    config.sourcemap = false;
    config.plugins.push(uglify());
    config.plugins.push(sizes());
    config.plugins.push(filesize());
} else {
    config.sourcemap = true;
}

export default config;
github SimonDEvans / takt / rollup.config.js View on Github external
plugins     : [
        resolve({
            jsnext: true,
            main: true,
            browser: true,
        }),
        commonjs(),
        babel(),
    ]
};

// Add Production or Development settings to the config object
if(process.env.production){
    config.sourceMap = false;
    config.plugins.push(uglify());
    config.plugins.push(sizes());
    config.plugins.push(filesize());
} else {
    config.sourceMap = true;
}

export default config;
github Shopify / js-buy-sdk / rollup-common.config.js View on Github external
babel({
        babelrc: false,
        presets: [
          [`${process.cwd()}/node_modules/babel-preset-env/lib/index`, {
            targets: {
              browsers: ['last 2 versions'],
              node: '8.1.2'
            },
            modules: false
          }]
        ],
        plugins: [
          `${process.cwd()}/node_modules/babel-plugin-external-helpers/lib/index`
        ]
      }),
      sizes()
    ],
    banner: `/*
      ${readFileSync('./LICENSE.txt')}
      */`,
    entry: 'src/client.js',
    moduleName: 'ShopifyBuy',
    sourceMap: true
  };
}

rollup-plugin-sizes

Show info about files/packages included with your rollup bundle

MIT
Latest version published 5 months ago

Package Health Score

74 / 100
Full package analysis

Popular rollup-plugin-sizes functions