-
Notifications
You must be signed in to change notification settings - Fork 86
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
How to replace css modules classes in js files without a templator #96
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: