Skip to content

Commit

Permalink
feat: add rollup config
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdeansanchez committed Nov 18, 2020
1 parent a113fea commit f62e8db
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import pkg from './package.json';

export default [
// browser-friendly UMD build
{
input: 'src/main.js',
output: {
name: 'imgix',
file: pkg.browser,
format: 'umd'
},
plugins: [
resolve(),
commonjs(),
babel({
exclude: ['node_modules/**']
})
]
},
{
input: 'src/main.js',
external: ['md5', 'js-base64'],
output: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' }
],
plugins: [
babel({
exclude: ['node_modules/**']
})
]
}
];

0 comments on commit f62e8db

Please sign in to comment.