bradleyboy / yarsk

Don't use this, use Create React App
192 stars 38 forks source link

css classnames #21

Closed 0x80 closed 9 years ago

0x80 commented 9 years ago

Hi,

Just wondering. Is there an easy way to give the generated local css classnames a more readable name so you can trace them back easily to the css classnames for debugging?

velveteer commented 9 years ago

@0x80 From the css-loader readme:

You can configure the generated ident with the localIdentName query parameter (default [hash:base64]). Example: css-loader?localIdentName=[path][name]---[local]---[hash:base64:5] for easier debugging.

0x80 commented 9 years ago

Thanks got it! I was confused by the fact that css-loader in the readme is spelled as css in the config. Same for style-loader vs style etc. Is it just a shorthand or is there a good reason to write it like that?

bradleyboy commented 9 years ago

Is it just a shorthand or is there a good reason to write it like that?

It's just shorthand. You can omit -loader in the webpack config for the sake of being concise.

Regarding the localIdentName, I'll get that added by default soon, unless someone wants to submit a PR :)