Skip to content

Conversation

@netizen01
Copy link

Move pkgroll to only generate ESM files, not CommonJS.

This fixes the error "TypeError: camelcaseKeys is not a function" that appears to projects that user "esModuleInterop" and would default to attempting to use CJS files.

Why? camelcaseKeys is not compatible with CommonJS, only ESM.

Impact: probably no one because this project would not function (runtime error) for anyone using it as a CJS import.

Also fix: circular references (imports) to the routes.

move the pkgroll to only generate ESM files, not CommonJS
this fixes the error "TypeError: camelcaseKeys is not a function"

fix: circular references
@netizen01
Copy link
Author

For reference:
sindresorhus/camelcase-keys#129

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

The author has a pretty hard stance on not supporting CJS and expects you to move to ESM, away from CJS. Not a completely unreasonable expectation given ESM has been the standard for quite a while now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant