ReactShadow icon indicating copy to clipboard operation
ReactShadow copied to clipboard

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

Open xumix opened this issue 4 years ago • 1 comments

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>

xumix avatar Aug 13 '21 13:08 xumix

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>

GisonL avatar Jan 25 '24 03:01 GisonL