Reactgo: Show ClassNames in DEV

Created on 12 May 2017  路  9Comments  路  Source: reactGo/reactGo

Anybody has a quick solution to disable classname hashing in DEV mode?

ex:
screen shot 2017-05-12 at 2 36 42 pm

All 9 comments

Changing this line should do it

let localIndentName = 'localIdentName=[name]__[local]___[hash:base64:5]';
if (!production) {
  localIndentName = 'localIdentName=[name]';
}

@psimyn hey buddy, that didn't seem to fix it for me =\

@psimyn any other ideas? sorry to bother =)

ah, it is a typo in the property name!

should be localIdentName not localIndentName - so the current one is broken and using the default.

I think if you fix the variable name we won't even need to the conditional - it will then have the classname before the hash.

Feel free to submit MR if you can fix this, otherwise I'll update when I'm on other computer

I will setup a PR asap. Thx!

Good find @psimyn

@psimyn unfortunately, the classNames are now appearing "readable" on PROD after this change... Any ideas?

screen shot 2017-05-18 at 4 04 29 pm

@jrodl3r Out of interest, why do you consider it a problem that your css classes are shown? Anyway, to answer your question, it's because you are still useing name even in prod;

let localIndentName = 'localIdentName=[name]__[local]___[hash:base64:5]';.

Remove it to something like;

let localIndentName = 'localIdentName=[local]___[hash:base64:5]';.

Or even;

let localIndentName = 'localIdentName=[hash:base64:5]';.

@GGAlanSmithee it adds another layer of user-visible security. For example, say some cheese-head comes along and starts inspecting your code, the scrambled class-names are pretty good sign that you have a legitly secured system, and they're more likely to keep moving along to the next potential target. Just optics more than anything for me ; ) Thx! 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jrodl3r picture jrodl3r  路  6Comments

kenjim83 picture kenjim83  路  8Comments

davidychow87 picture davidychow87  路  4Comments

choonkending picture choonkending  路  4Comments

azamatsmith picture azamatsmith  路  6Comments