How to disable Amplify from loading its Auth CSS theme file in a React app?
See original GitHub issue** Which Category is your question related to? ** Auth theme CSS files
** What AWS Services are you utilizing? ** aws-amplify-react within a React app
** Provide additional details e.g. code snippets ** I’m using Amplify in my React app. For Auth I don’t use any of the provided UI and just use it programmatically through its provided state changes to interact with Cognito. I hide the default components and provide my own theme object (which basically sets everything to null).
<Authenticator hideDefault={true} onStateChange={this.handleAuthStateChange} theme={theme}>
However, I still see that even after I build my react app for production the CSS theme file that comes with Amplify Auth UI gets loaded in. How do I completely disable this CSS from being included? I’m trying to cut down my deployed file sizes as much as possible. Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top GitHub Comments
This will be a part of our UI Component refactor. I will keep this issue open so we can track this request.
Hey @j0b0sapi3n,
This is currently not possible to do but this seems like a necessary enhancement. I’ll investigate how we can make this happen.