feat(rollup): add bundle size

This commit is contained in:
moklick
2019-07-15 19:09:09 +02:00
parent 8b0e013abc
commit 52241d2be8
5 changed files with 155 additions and 34490 deletions
+7
View File
@@ -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()]
}),