Skip to content

fix: default CJS exports #101

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

Merged
merged 2 commits into from
Dec 1, 2023
Merged

Conversation

userquin
Copy link
Member

@userquin userquin commented Dec 1, 2023

Description

This PR includes:

  • add exports.__esModule=true; to cjs modules, Vite working (tested with 4.5.0 and 5.0.4: CJS deprecation warning now missing in Vite 5)
  • don't remove d.mts files, using them in package exports

Linked Issues

closes #100

Additional context

Downloaded https://stackblitz.com/edit/vitejs-vite-9ncgh5?file=main.js to local and using a local copy of this PR:

Vite 4:
imagen

Vite 5:
imagen

@antfu antfu merged commit f8d302c into antfu-collective:main Dec 1, 2023
@userquin userquin deleted the fix-cjs-types branch December 1, 2023 22:49
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.

Inspect is not a function, Inspect.default is
2 participants