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

Default exports are not set as configurable #14

Closed
devcorraliza opened this issue Oct 21, 2022 · 3 comments · Fixed by #16
Closed

Default exports are not set as configurable #14

devcorraliza opened this issue Oct 21, 2022 · 3 comments · Fixed by #16
Labels
bug Something isn't working

Comments

@devcorraliza
Copy link

Hello, first of all thx for the plugin, it is being very useful at jest transform.
I would like to advice you that transpiled code defines default export is not being defined through your _export function son it keeps not configurable.

Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: () => _default
});

It would be great if also default property is set as configurable.

@magic-akari magic-akari added the bug Something isn't working label Oct 25, 2022
@pbomb
Copy link

pbomb commented Oct 31, 2022

We're running into this same issue and is one of the last blockers to switching from babel-jest. Unfortunately I don't know Rust & SWC to help fix this issue, but just wanted to voice my support for fixing it.

@pbomb
Copy link

pbomb commented Nov 1, 2022

For reference, this is the corresponding Pull Request that Vite made so that Vitest could correctly mock the default export of a module.

@devcorraliza
Copy link
Author

Thx a lot for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants