-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Calm esm warnings #3872
Calm esm warnings #3872
Conversation
🦋 Changeset detectedLatest commit: aef5de3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet! Thank you so much for taking the time to work on this.
One other thing I've noticed (with the current implementation) is that if there's a dep of a dep that's ESM only I'll get a warning about that as well. For example, in mdx-bundler we're using @mdx-js/esbuild
and remark-frontmatter
which are both ESM-only, but mdx-bundler itself is CJS so it's using a dynamic import: https://github.com/kentcdodds/mdx-bundler/blob/37f402702bcf8163cb64314a8c43ed9efac04fbc/src/index.js#L39-L42
Does this cover that use case as well? If not, can you expand this PR to silence those as well?
@kentcdodds I added a test for a CJS package that does a dynamic import of an ESM only package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stellar. Thank you!
Closes: #
Testing Strategy:
Added integration test that checks console output for warnings.