Silind-Software / direflow

🧩 Use the best of two worlds. Create fast, performant, native Web Components using React.
https://direflow.io
MIT License
501 stars 78 forks source link

Css Modules #238

Open nitroplonker opened 3 years ago

nitroplonker commented 3 years ago

Hi,

My aim is to use my existing React library of components (built on CRA using css modules) inside Angular apps. The problem i am running into is that when trying to build the component it doesn't appear to generate the modularized css file that it is referencing inside the component

ENOENT: no such file or directory, open 'C:\Source\library\dave-component\build\static\css\main.b5c61002.css'

Any ideas on how to get this working?

Any help would be much appreciated

Thanks

yaya-bhavik commented 3 years ago

Hi @nitroplonker,

If you are importing the CSS into your React Component like https://direflow.io/styling . After build, your styles are added to the main JS file and at runtime of the main JS file your CSS as a string will be added to the DOM via style tags within your web-components when they are rendered.