-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Vitest v24+ appears to break some default exports #2509
Comments
I'm seeing this with named exports. Using |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
While upgrading to Vite 4 I also needed to upgrade vitest which was at 0.23.4.
Upgrading to any version of 0.24.x appears to break imports of modules that use a default export. I personally encountered this with
react-dropzone
andreact-router-navigation-prompt
.Reproduction
This stackblitz (https://stackblitz.com/edit/github-w9fjy7-juwvvx) has vitest at 0.23.4 and it renders the dropzone.
This one (https://stackblitz.com/edit/github-w9fjy7-9uzxfy) fails because the import from
react-dropzone
ends up being an object, not the functional component. The only different is vitest at 0.24.4I am not an expert in all the clashes with different module types etc. but the changelog doesn't seem to indicate that this would be an issue.
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: