Skip to content
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

Generated classnames contain 'styles' prefix #514

Closed
janhoogeveen opened this issue Jul 25, 2017 · 2 comments
Closed

Generated classnames contain 'styles' prefix #514

janhoogeveen opened this issue Jul 25, 2017 · 2 comments

Comments

@janhoogeveen
Copy link
Contributor

janhoogeveen commented Jul 25, 2017

Versions of kyt, node, OS

Kyt v0.7.0
Node v8.1.2
NPM v5.3.0

Bug or Feature?

Bug-ish

Current Behavior

CSS Modules stylenames are getting the 'styles-' prefix in DOM output. I've never seen CSS-modules do this.

screen shot 2017-07-25 at 09 52 02

Desired Behavior

Instead of
styles-LoginForm--382l8

I'd expect to see
LoginForm--382l8

as the generated classname.

Worth mentioning is that the style filenames are styles.scss.

@tizmagik
Copy link
Contributor

This is because of how the localIdentName is specified:

localIdentName: '[name]-[local]--[hash:base64:5]'

So it uses the filename then the "local" className then a hash. You could change this in your modifyWebpackConfig() or change the scss filename to match the component name.

@janhoogeveen
Copy link
Contributor Author

Got it! Thanks for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants