Skip to content

Commit

Permalink
feat: 🎸 add rollup-plugin-commonjs
Browse files Browse the repository at this point in the history
Convert CommonJS modules to ES6 to be able to included in a rollup
bundle
  • Loading branch information
samAbeywickrama committed Aug 6, 2019
1 parent fb009be commit 338af88
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
37 changes: 37 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"rimraf": "^2.6.3",
"rollup": "^1.17.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "10.0.2",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-peer-deps-external": "^2.2.0",
"rollup-plugin-postcss": "^2.0.3",
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import babel from "rollup-plugin-babel";
import resolve from "rollup-plugin-node-resolve";
import peerDepsExternal from "rollup-plugin-peer-deps-external";
import postcss from "rollup-plugin-postcss";
import commonjs from "rollup-plugin-commonjs";
import { terser } from "rollup-plugin-terser";

const name = "Name";
Expand Down Expand Up @@ -38,6 +39,7 @@ export default {
babel({
exclude: "node_modules/**"
}),
prod && terser()
prod && terser(),
commonjs()
]
};

0 comments on commit 338af88

Please sign in to comment.