rollup / rollup-plugin-commonjs

This module has moved and is now available at @rollup/plugin-commonjs / https://github.com/rollup/plugins/blob/master/packages/commonjs
MIT License
502 stars 126 forks source link

Allow chunks #322

Closed caub closed 6 years ago

caub commented 6 years ago

It's needed by "chunks" mode https://github.com/rollup/rollup/pull/2084#issuecomment-393440509 chunks options allow objects as input:

it solved this issue:

[!] TypeError: str.slice is not a function
TypeError: str.slice is not a function
    at startsWith (/home/caub/dev/color-wheel/node_modules/rollup-plugin-commonjs/src/index.js:37:13)
lukastaegert commented 6 years ago

Thanks for the PR and sorry for little communication. I decided to give preference to #329 as it also contained a test but reformatted the code so that it works more like your PR as I liked the code better.