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

To help you get started, we’ve selected a few rollup-plugin-ignore 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 videojs / video.js / rollup.config.js View on Github external
const watch = {
  clearScreen: false
};

const onwarn = (warning) => {
  // ignore unknow option for --no-progress
  if (warning.code === 'UNKNOWN_OPTION' && warning.message.indexOf('progress') !== -1) {
    return;
  }

  // eslint-disable-next-line no-console
  console.warn(warning.message);
};

const primedIgnore = ignore(['videojs-vtt.js']);
const primedResolve = resolve({
  mainFields: ['jsnext:main', 'module', 'main'],
  browser: true
});
const primedCjs = commonjs({
  sourceMap: false
});
const primedBabel = babel({
  runtimeHelpers: true,
  babelrc: false,
  exclude: 'node_modules/**(!http-streaming)',
  compact: false,
  presets: [
    ['@babel/preset-env', {
      loose: true,
      modules: false
github videojs / video.js / build / rollup.js View on Github external
/**
 * Core video.js without vtt.js
 */
const novttCoreUmd = Object.assign({}, _.cloneDeep(coreUmd), {
  banner: compiledLicense(Object.assign({includesVtt: false}, bannerData)),
  dest: 'dist/alt/video.core.novtt.js'
});

novttCoreUmd.options.plugins.unshift(ignore(['videojs-vtt.js']));

const minifiedNovttCoreUmd = Object.assign({}, _.cloneDeep(minifiedCoreUmd), {
  banner: compiledLicense(Object.assign({includesVtt: false}, bannerData)),
  dest: 'dist/alt/video.core.novtt.min.js'
});

minifiedNovttUmd.options.plugins.unshift(ignore(['videojs-vtt.js']));

function runRollup({options, useStrict, format, dest, banner}) {
  rollup(options)
  .then(function(bundle) {
    bundle.write({
      useStrict,
      format,
      dest,
      banner,
      moduleName: 'videojs',
      sourceMap: false
    });
  }, function(err) {
    // eslint-disable-next-line no-console
    console.error(err);
  });
github OutThisLife / imgblur / rollup.config.js View on Github external
{
        ...base.output,
        file: `${output}.browser.es.js`,
        format: 'es'
      },
      {
        ...base.output,
        file: `${output}.browser.cjs.js`,
        format: 'cjs'
      }
    ],
    plugins: base.plugins.concat(
      replace({
        __SERVER__: JSON.stringify(false)
      }),
      ignore(['stream'])
    )
  }

  return [devUmd, prodUmd, serverConfig, browserConfig]
}
github yohangz / universal-node-module-starter / gulpfile.babel.js View on Github external
assetPaths: config.assetPaths
        }),
        postCssAutoPrefix,
      ])
        .process(css, { from: undefined })
        .then(result => result.css)
    }
  })
};

const rollupReplacePlugin = rollupReplace({
  patterns: config.pathReplacePatterns
});

const resolvePlugins = [
  rollupIgnore(config.ignore),
  rollupResolve({
    jsnext: true,
    main: true,
    browser: true,
    preferBuiltins: false
  }),
  rollupCommonjs({
    include: 'node_modules/**'
  })
];

const buildPlugin = (esVersion, generateDefinition, watch) => {
  if (config.tsProject) {
    let buildConf = {
      tsconfig: `tsconfig.${esVersion}.json`,
      typescript: typescript,
github algolia / algoliasearch-client-javascript / rollup.config.js View on Github external
if (isUmdBuild || isEsmBrowserBuild || dependencies === undefined) {
        dependencies = [];
      }

      rollupConfig.push({
        input: packageResolve(packageConfig.input),
        external: Object.keys(dependencies).concat(packageConfig.external),
        plugins: [
          json({
            namedExports: false,
          }),
          globals({
            global: true,
          }),
          ignore(packageConfig.ignore || []),
          ts({
            check: !hasTSChecked,
            tsconfig: path.resolve(__dirname, 'tsconfig.json'),
            cacheRoot: path.resolve(__dirname, 'node_modules/.rts2_cache'),
            tsconfigOverride: {
              include: ['packages/**/src/**/*.ts'],
              exclude: ['packages/**/src/__tests__/**/*.ts'],
              compilerOptions: {
                declaration: !hasTSChecked,
                declarationMap: !hasTSChecked,
              },
            },
          }),
          alias(aliasOptions),
          ...transpilerPlugins,
          ...compressorPlugins,

rollup-plugin-ignore

Ignore a module in rollup.js

MIT
Latest version published 3 years ago

Package Health Score

52 / 100
Full package analysis

Popular rollup-plugin-ignore functions