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

Calm esm warnings #3872

Merged
merged 3 commits into from
Jul 30, 2022
Merged

Calm esm warnings #3872

merged 3 commits into from
Jul 30, 2022

Conversation

jacob-ebey
Copy link
Member

Closes: #

  • Docs
  • Tests

Testing Strategy:

Added integration test that checks console output for warnings.

@changeset-bot
Copy link

changeset-bot bot commented Jul 29, 2022

🦋 Changeset detected

Latest commit: aef5de3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@remix-run/dev Patch
create-remix Patch
remix Patch
@remix-run/eslint-config Patch
@remix-run/react Patch
@remix-run/serve Patch
@remix-run/server-runtime Patch
@remix-run/cloudflare Patch
@remix-run/node Patch
@remix-run/deno Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
@remix-run/express Patch
@remix-run/netlify Patch
@remix-run/vercel Patch
@remix-run/architect Patch

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

Copy link
Member

@kentcdodds kentcdodds left a 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?

@jacob-ebey
Copy link
Member Author

jacob-ebey commented Jul 29, 2022

@kentcdodds I added a test for a CJS package that does a dynamic import of an ESM only package.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stellar. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants