Skip to content

Commit

Permalink
🔧 Add Rollup.js config
Browse files Browse the repository at this point in the history
  • Loading branch information
kghugo committed Aug 4, 2020
1 parent 6bbe127 commit 9a49c57
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const {
terser
} = require('rollup-plugin-terser')
const {
nodeResolve
} = require('@rollup/plugin-node-resolve')
const commonjs = require('@rollup/plugin-commonjs')
// const peerDepsExternal = require('rollup-plugin-peer-deps-external')

export default [{
input: './index.js',
output: [{
file: 'dist/index.esm.js',
format: 'esm',
plugins: [
terser({
compress: {
drop_console: true
},
output: {
comments: false
},
ecma: 2019
})
]
},
{
file: 'dist/index.cjs.js',
format: 'cjs',
plugins: [
terser({
compress: {
drop_console: true
},
output: {
comments: false
},
ecma: 2019
})
]
},
],
plugins: [
nodeResolve({}),
commonjs({
include: ['./src/**', 'node_modules/**']
})
]
}]

0 comments on commit 9a49c57

Please sign in to comment.