Skip to content

Commit

Permalink
simpify build script
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed May 18, 2020
1 parent 54176fc commit 8eda417
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ import pnp from 'rollup-plugin-pnp-resolve';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import pkg from './package.json';

export default [
{
input: 'src/bundle.js',
output: {
file: 'build/Chart.BoxPlot.js',
file: pkg.main,
name: 'ChartBoxPlot',
format: 'umd',
globals: {
'chart.js': 'Chart',
},
},
external: ['chart.js'],
external: Object.keys(pkg.peerDependencies),
plugins: [commonjs(), pnp(), resolve(), babel({ babelHelpers: 'runtime' })],
},
{
input: 'src/index.js',
output: {
file: 'build/Chart.BoxPlot.esm.js',
name: 'ChartBoxPlot',
file: pkg.module,
format: 'esm',
globals: {
'chart.js': 'Chart',
},
},
external: ['chart.js', '@babel/runtime', '@sgratzl/science.js'],
external: Object.keys(pkg.peerDependencies).concat(Object.keys(pkg.dependencies)),
plugins: [commonjs(), pnp(), resolve()],
},
];

0 comments on commit 8eda417

Please sign in to comment.