You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you someone please provide an example how to insert generated modules into js files?
Using docs I built css modules and I saw examples for html and templators but want to keep my js files clean of special template syntax. In my case I'm building React app and when I converted css into modules I updated import in components to import styles from "./MyComponent.module.css"; and class assignment statements <div className={styles.myClass}>. After transpiling it was turned into { className: MyComponent_module_css_1.default.myClass }. What would be the best approach to replace such generated styles or it's done somehow differently?
The text was updated successfully, but these errors were encountered:
aslanovsergey
changed the title
How insert css modules in js files
How to replace css modules classes in js files without a templator
Jul 16, 2019
Post title is wrong. He is asking how to use cssmodules in js files wthout templator.
Replacing classes in JS is another task in which i am still very interested.
How to change css-classes in js files ?
Hello,
Could you someone please provide an example how to insert generated modules into js files?
Using docs I built css modules and I saw examples for html and templators but want to keep my js files clean of special template syntax. In my case I'm building React app and when I converted css into modules I updated import in components to
import styles from "./MyComponent.module.css";
and class assignment statements<div className={styles.myClass}>
. After transpiling it was turned into{ className: MyComponent_module_css_1.default.myClass }
. What would be the best approach to replace such generated styles or it's done somehow differently?The text was updated successfully, but these errors were encountered: