How to use the kcd-scripts/dist/config/rollup.config.js.plugins function in kcd-scripts

To help you get started, we’ve selected a few kcd-scripts 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 downshift-js / downshift / rollup.config.js View on Github external
const babel = require('rollup-plugin-babel')
const commonjs = require('rollup-plugin-commonjs')
const config = require('kcd-scripts/dist/config/rollup.config.js')
const babelPluginIndex = config.plugins.findIndex(
  plugin => plugin.name === 'babel',
)
const cjsPluginIndex = config.plugins.findIndex(
  plugin => plugin.name === 'commonjs',
)
config.plugins[babelPluginIndex] = babel({
  runtimeHelpers: true,
})
config.plugins[cjsPluginIndex] = commonjs({
  include: 'node_modules/**',
  namedExports: {
    'react-is': ['isForwardRef'],
  },
})
module.exports = config
github downshift-js / downshift / rollup.config.js View on Github external
const babel = require('rollup-plugin-babel')
const commonjs = require('rollup-plugin-commonjs')
const config = require('kcd-scripts/dist/config/rollup.config.js')
const babelPluginIndex = config.plugins.findIndex(
  plugin => plugin.name === 'babel',
)
const cjsPluginIndex = config.plugins.findIndex(
  plugin => plugin.name === 'commonjs',
)
config.plugins[babelPluginIndex] = babel({
  runtimeHelpers: true,
})
config.plugins[cjsPluginIndex] = commonjs({
  include: 'node_modules/**',
  namedExports: {
    'react-is': ['isForwardRef'],
  },
})
module.exports = config