Accepted answer

Prior to version 2.12.0 we had some treeshaking issues in the @aws-amplify/ui-react package which prevented the icons from being removed. This was fixed in version 2.12.0. See CHANGELOG. It looks like you may be using 2.10.4. Can you make sure you are on the latest version?

npm install @aws-amplify/ui-react@latest

If you don't see a reduction in bundle size after upgrading the latest version that's a bug, and we would like to get it fixed. You can either respond to this issue or even better would be to open a bug here.


The Authenticator component does not import anything from its parent directories, so you could probably just extract the code from here and install any dependencies that are missing.

Related Query

More Query from same tag