Skip to content

Commit

Permalink
Add ESM version
Browse files Browse the repository at this point in the history
  • Loading branch information
vladshcherbin committed Jan 29, 2019
1 parent 9b2bb47 commit 4d7f440
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"version": "0.2.0",
"author": "Vlad Shcherbin <vlad.shcherbin@gmail.com>",
"repository": "vladshcherbin/rollup-plugin-delete",
"main": "dist/index.js",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"scripts": {
"lint": "eslint src",
"build": "rollup -c",
Expand Down
14 changes: 10 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ import babel from 'rollup-plugin-babel'

export default {
input: 'src/index.js',
output: {
file: 'dist/index.js',
format: 'cjs'
},
output: [
{
file: 'dist/index.cjs.js',
format: 'cjs'
},
{
file: 'dist/index.esm.js',
format: 'esm'
}
],
plugins: [
babel({
presets: [['@babel/preset-env', { targets: { node: 8 } }]]
Expand Down

0 comments on commit 4d7f440

Please sign in to comment.