Skip to content

Commit

Permalink
refactor(rollup): cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Oct 7, 2019
1 parent 72156e1 commit c6b96e9
Showing 1 changed file with 31 additions and 32 deletions.
63 changes: 31 additions & 32 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,35 @@ import pkg from './package.json';
const isProd = process.env.NODE_ENV === 'production';

export default [{
input: 'src/index.js',
external: ['react', 'react-dom', 'prop-types'],
onwarn(warning, rollupWarn) {
if (warning.code !== 'CIRCULAR_DEPENDENCY') {
rollupWarn(warning);
}
},
output: {
name: 'ReactFlow',
file: pkg.browser,
format: 'umd',
sourcemap: isProd,
globals: {
react: 'React',
'react-dom': 'ReactDOM',
'prop-types': 'PropTypes'
}
},
plugins: [
bundleSize(),
postcss(),
resolve(),
babel({
exclude: 'node_modules/**'
}),
commonjs({
include: /node_modules/
}),
visualizer(),
isProd && uglify()
]
}
input: 'src/index.js',
external: ['react', 'react-dom', 'prop-types'],
onwarn(warning, rollupWarn) {
if (warning.code !== 'CIRCULAR_DEPENDENCY') {
rollupWarn(warning);
}
},
output: {
name: 'ReactFlow',
file: pkg.browser,
format: 'umd',
sourcemap: isProd,
globals: {
react: 'React',
'react-dom': 'ReactDOM',
'prop-types': 'PropTypes'
}
},
plugins: [
bundleSize(),
postcss(),
resolve(),
babel({
exclude: 'node_modules/**'
}),
commonjs({
include: /node_modules/
}),
visualizer(),
isProd && uglify()
]}
];

0 comments on commit c6b96e9

Please sign in to comment.