Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const rollupConfig = require('kcd-scripts/config').getRollupConfig()
const tiny = process.env.TINY
const esm = process.env.BUILD_FORMAT === 'esm'
Object.assign(rollupConfig, {
external: ['preact', 'react', 'glamor', 'prop-types'],
output: [
Object.assign(rollupConfig.output[0], {
exports: tiny || !esm ? 'default' : 'named',
name: 'glamorous',
globals: {
react: 'React',
preact: 'preact',
glamor: 'Glamor',
'prop-types': 'PropTypes',
},
const rollupConfig = require('kcd-scripts/config').getRollupConfig();
Object.assign(rollupConfig, {
external: ['preact', 'react', 'prop-types'],
output: [
Object.assign(rollupConfig.output[0], {
globals: {
react: 'React',
preact: 'preact',
'prop-types': 'PropTypes'
}
})
]
});
module.exports = rollupConfig;
module.exports = () => {
const getRollupConfig = require('kcd-scripts/config').getRollupConfig
const rollupConfig = getRollupConfig()
replace(rollupConfig.plugins, 'babel', () => {
const babel = require('rollup-plugin-babel')
return babel({
exclude: 'node_modules/**',
babelrc: true,
runtimeHelpers: true,
})
})
return rollupConfig
}
import copy from 'rollup-plugin-copy';
import postcss from 'rollup-plugin-postcss';
const rollupConfig = require('kcd-scripts/config').getRollupConfig();
module.exports = {
input: 'src/index.js',
external: ['react', 'react-dom', 'prop-types', 'semantic-ui-react'],
output: Object.assign(rollupConfig.output[0], {
file: 'dist/react-semantic-ui-datepickers.js',
sourcemap: true,
}),
plugins: [
copy({
'src/locales': 'dist/locales',
'src/index.d.ts': 'dist/index.d.ts',
}),
postcss({ extract: true, minimize: true }),
].concat(rollupConfig.plugins),
};