feat(rollup): add bundle size
This commit is contained in:
@@ -3,12 +3,18 @@ import commonjs from 'rollup-plugin-commonjs';
|
||||
import babel from 'rollup-plugin-babel';
|
||||
import postcss from 'rollup-plugin-postcss';
|
||||
import autoprefixer from 'autoprefixer';
|
||||
import bundleSize from 'rollup-plugin-bundle-size';
|
||||
|
||||
import pkg from './package.json';
|
||||
|
||||
export default [{
|
||||
input: 'src/index.js',
|
||||
external: ['react', 'prop-types'],
|
||||
onwarn(warning, rollupWarn) {
|
||||
if (warning.code !== 'CIRCULAR_DEPENDENCY') {
|
||||
rollupWarn(warning);
|
||||
}
|
||||
},
|
||||
output: {
|
||||
name: 'ReactGraph',
|
||||
file: pkg.browser,
|
||||
@@ -20,6 +26,7 @@ export default [{
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
bundleSize(),
|
||||
postcss({
|
||||
plugins: [autoprefixer()]
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user