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

Ref: disabling dynamic imports in CJS build #1757

Merged
merged 2 commits into from
May 12, 2024

Conversation

RobinTail
Copy link
Owner

There is a Jest issue on handling dynamic imports that is really annoying.
I used to apply an approach discussed in this issue:
evanw/esbuild#2651
But now I'm going to apply another approach from the same one, just by disabling the dynamic imports for CJS, as a cleaner way (in my opinion).

https://esbuild.github.io/api/#supported

@RobinTail RobinTail added refactoring The better way to achieve the same result external bug it's a bug, but in a dependency labels May 12, 2024
@RobinTail RobinTail marked this pull request as ready for review May 12, 2024 10:31
@RobinTail RobinTail merged commit 8f9352b into master May 12, 2024
11 checks passed
@RobinTail RobinTail deleted the ref-peer-helper-cjs-for-jest branch May 12, 2024 10:41
RobinTail added a commit that referenced this pull request May 12, 2024
Still has issues with dynamic imports (disabled for CJS in #1757 )
More details on that issue I posted in
evanw/esbuild#2651 (comment)

Article on exact issue:

https://nodejs.org/api/vm.html#support-of-dynamic-import-in-compilation-apis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external bug it's a bug, but in a dependency refactoring The better way to achieve the same result
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant