DEV Community

Cover image for Missing Amplify UI Styles in Electron App
Ivan Bliskavka
Ivan Bliskavka

Posted on • Edited on • Originally published at bliskavka.com

1

Missing Amplify UI Styles in Electron App

I recently discovered the Electron React Boilerplate project and wanted to use the AWS Amplify Authenticator. Lo and Behold: its ugly...

I had used the typical index.tsx import and I could see the CSS output, but for some reason it did not work.

// index.tsx
import "@aws-amplify/ui/dist/style.css";
Enter fullscreen mode Exit fullscreen mode

After much Googling, it turns out that Electron React Boiler plate does some webpack-ing magic under the hood.

The correct way to add the css is to import it in App.global.css:

/* App.global.css */
@import '~@aws-amplify/ui/dist/style.css';
Enter fullscreen mode Exit fullscreen mode

Originally posted on my blog

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay