Skip to content

Commit

Permalink
fix(rollup): add rollup-plugin-commonjs too
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Jan 26, 2018
1 parent 374ab64 commit bdfa97d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"markdown-doctest": "^0.9.1",
"nyc": "^11.4.1",
"rollup": "^0.55.1",
"rollup-plugin-commonjs": "^8.3.0",
"rollup-plugin-multi-entry": "^2.0.2",
"rollup-plugin-node-resolve": "^3.0.2",
"semantic-release": "^12.2.5",
Expand Down
4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import pkg from './package.json';
import resolve from 'rollup-plugin-node-resolve';

import commonjs from 'rollup-plugin-commonjs';
export default {
output: {
file: pkg.main,
format: 'cjs'
},
plugins: [resolve()],
plugins: [resolve(), commonjs()],
external: [
'os',
'util',
Expand Down
3 changes: 2 additions & 1 deletion tests/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import multiEntry from 'rollup-plugin-multi-entry';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';

export default {
input: 'tests/**/*-test.js',
Expand All @@ -14,7 +15,7 @@ export default {
'expression-expander',
'pratt-parser'
],
plugins: [multiEntry(), resolve()],
plugins: [multiEntry(), resolve(), commonjs()],

output: {
file: 'build/bundle-test.js',
Expand Down

0 comments on commit bdfa97d

Please sign in to comment.