Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

str.slice is not a function when using experimentalCodeSplitting and the input is an object #334

Closed
Couto opened this issue Jul 31, 2018 · 1 comment

Comments

@Couto
Copy link

Couto commented Jul 31, 2018

According to Rollup's documentation is possible to pass an object of named entry points to the input property if we enable the experimentalCodeSplitting.

However, this seems to break whenever the commonjs plugin is being used:

TypeError: str.slice is not a function
    at startsWith (node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js:633:13)
    at resolveId (node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js:675:23)
    at node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js:763:49
    at Array.map (<anonymous>)
    at Object.options (node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js:763:18)
    at applyOptionHook (node_modules/rollup/dist/rollup.js:22009:23)
    at Array.reduce (<anonymous>)
    at getInputOptions$1 (node_modules/rollup/dist/rollup.js:22032:41)
    at Object.rollup (node_modules/rollup/dist/rollup.js:22093:30)
    at build (node_modules/rollup/bin/rollup:1151:19)

error Command failed with exit code 1.

Theres a small demo of this problem in the following gist to demonstrate the problem.

@Couto
Copy link
Author

Couto commented Jul 31, 2018

Closing this issue in favour of #329

@Couto Couto closed this as completed Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant