Skip to content

fix: use cognito-identity provider directly to fix browser bundle#332

Closed
drskur wants to merge 1 commit into
devfrom
fix/credential-provider-browser-bundle
Closed

fix: use cognito-identity provider directly to fix browser bundle#332
drskur wants to merge 1 commit into
devfrom
fix/credential-provider-browser-bundle

Conversation

@drskur

@drskur drskur commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The frontend imported fromCognitoIdentityPool from the @aws-sdk/credential-providers barrel package, which re-exports Node-only providers. The web-identity package stubs out fromTokenFile via its browser field, so esbuild failed to optimize the dependency with 'No matching export for fromTokenFile' in the browser build.

Import fromCognitoIdentityPool directly from
@aws-sdk/credential-provider-cognito-identity to avoid pulling in the Node-only provider chain.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The frontend imported fromCognitoIdentityPool from the @aws-sdk/credential-providers
barrel package, which re-exports Node-only providers. The web-identity package
stubs out fromTokenFile via its browser field, so esbuild failed to optimize the
dependency with 'No matching export for fromTokenFile' in the browser build.

Import fromCognitoIdentityPool directly from
@aws-sdk/credential-provider-cognito-identity to avoid pulling in the Node-only
provider chain.
@drskur drskur closed this Jul 3, 2026
@drskur drskur deleted the fix/credential-provider-browser-bundle branch July 3, 2026 06:03
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.

1 participant