Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

Use relative paths in es module specifiers #563

Closed
bennypowers opened this issue Oct 20, 2017 · 2 comments
Closed

Use relative paths in es module specifiers #563

bennypowers opened this issue Oct 20, 2017 · 2 comments

Comments

@bennypowers
Copy link

On line 20 of CognitoUserPool.js,

import CognitoIdentityServiceProvider from 'aws-sdk/clients/cognitoidentityserviceprovider';

breaks the browser, since 'aws-sdk/clients/cognitoidentityserviceprovider'; is not a valid specifier.

I would suggest changing that line to

import CognitoIdentityServiceProvider from '../../aws-sdk/clients/cognitoidentityserviceprovider';

So that users who aren't looking to add a build step don't have to.

I realize that this will also require the aws-sdk lib to release an es modules version. See aws/aws-sdk-js#1766

@itrestian
Copy link
Contributor

It seems this is dependent on the issue you mentioned. Also, we are considering removing the AWS SDK dependency #473

@itrestian
Copy link
Contributor

You can have a look at AWS Amplify which exposes a higher order auth component for this SDK. Maybe that can suit your use case. Also note that we will continue developing this library in the AWS Amplify repo. We have also removed the AWS SDK dependency.

https://github.com/aws/aws-amplify

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

No branches or pull requests

2 participants