-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Unavailable classNames when using css-modules #2995
Comments
I've kinda found the workaroud for that, if I override not |
Using |
@mcmire yes I've tried different ways to import styles. so it doesn't really matter how I import styles it works with workaround I've described in #2995 (comment) |
@NikitaProkofyevVKDevLab Gotcha, I didn't catch that. I guess I don't really know what you were trying to do originally, but glad you worked it out. |
I still have a question though, I'm currently trying to use styleName properties in react with this setup and I hashes of local stylenames doesn't match, everything else works fine, I mean css files generated correctly and stylename properties generate stylenames correctly but the last part with the hash is different. maybe someone can tell me what's wrong.
|
@NikitaProkofyevVKDevLab Ah — thanks for the additional context behind your problem, that helps a lot. I haven't used module.exports = environment.toWebpackConfig() to: const webpackConfig = environment.toWebpackConfig()
console.log(require("util").inspect(webpackConfig, { depth: null })
module.exports = webpackConfig Then copy and paste the output you get here. That should give you the entire Webpack config that Webpacker is creating. |
I ran across something similar your |
Hey, I'm overriding moduleSass loader of the webpacker config and I cannot use imported styles in react,
here's example of my override
btw I've tried to use code examples from #756 (comment) without any modification and build just fails.
I can see the that the file is available in the html document but unable to apply classname, styles object is empty
I import it like this:
import * as styles from './styles.module.scss';
The text was updated successfully, but these errors were encountered: