Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any chance to have a working example with CRA and TS? #119

Open
xumix opened this issue Aug 13, 2021 · 1 comment
Open

Is there any chance to have a working example with CRA and TS? #119

xumix opened this issue Aug 13, 2021 · 1 comment

Comments

@xumix
Copy link

xumix commented Aug 13, 2021

I'm struggling with implementing a widget based on create react app, particularly, I'm unable to add my global styles to the shadow root since style-loader injects them into head
Could you please give some direction how to fix this? Maybe it is possible to attach to an pre-existing shadowRoot?

I've tried

import style from "./css/site.css";

<style type="text/css">{style.toString()}</style>

but this gives me
<style type="text/css">[object Module]</style>

@GisonL
Copy link

GisonL commented Jan 25, 2024

use inline loader to import pure string styles from css
import tailwindCSS from "@/styles/tailwind.less?inline";
and then
<style type="text/css">{tailwindCSS}</style>

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

No branches or pull requests

2 participants