diff --git a/package.json b/package.json index 47a3bb9e..8181607f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/rollup.config.js b/rollup.config.js index 2192f7c4..43f54e6f 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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', diff --git a/tests/rollup.config.js b/tests/rollup.config.js index 4d472e35..273962a7 100644 --- a/tests/rollup.config.js +++ b/tests/rollup.config.js @@ -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', @@ -14,7 +15,7 @@ export default { 'expression-expander', 'pratt-parser' ], - plugins: [multiEntry(), resolve()], + plugins: [multiEntry(), resolve(), commonjs()], output: { file: 'build/bundle-test.js',