Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add type: module and use .cjs/.mjs extension #119

Open
unional opened this issue Aug 5, 2024 · 0 comments
Open

add type: module and use .cjs/.mjs extension #119

unional opened this issue Aug 5, 2024 · 0 comments

Comments

@unional
Copy link

unional commented Aug 5, 2024

Currently when consuming this project with moduleResolution: Node16/NodeNext fail with the following errors:

.../node_modules/micro-memoize/src/Cache.ts(4,10): error TS1286: ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled.

Add type: module and use .cjs/.mjs extension would fix it.

i.e.:

  • add type: module
  • dist/micro-memoize.cjs.js -> dist/micro-memoize.cjs
  • dist/micro-memoize.mjs.js -> dist/micro-memoize.mjs
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

No branches or pull requests

1 participant