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

Remove "module" export condition to prevent confusion with webpack #407

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

paul-sachs
Copy link
Collaborator

@paul-sachs paul-sachs commented Sep 9, 2024

The "module" export condition is overriding the other conditions in webpack, so a cjs file importing connect-query will resolve to the esm module instead.

Fixes #406

Signed-off-by: Paul Sachs <psachs@buf.build>
@paul-sachs
Copy link
Collaborator Author

paul-sachs commented Sep 9, 2024

I guess we could also move module down below and do something like:

"exports": {
  ".": {
    "import": "./dist/esm/index.js",
    "require": "./dist/cjs/index.cjs",
    "module": "./dist/esm/index.js"
  }
},

But i'd rather remove it entirely and not have to worry about it. Removing is also brings this package into line with the other connect packages.

Copy link
Member

@timostamm timostamm left a comment

Choose a reason for hiding this comment

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

CI is busy, but LGTM if it turns green.

@paul-sachs paul-sachs merged commit d12ba2d into main Sep 9, 2024
6 checks passed
@paul-sachs paul-sachs deleted the psachs/fix-406 branch September 9, 2024 15:45
@paul-sachs paul-sachs mentioned this pull request Sep 9, 2024
paul-sachs added a commit that referenced this pull request Sep 9, 2024
## What's Changed
* Remove "module" export condition to prevent confusion with webpack by
@paul-sachs in #407

**Full Changelog**:
v1.4.1...v1.4.2

Signed-off-by: Paul Sachs <psachs@buf.build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fails when importing with webpack into CJS context
2 participants