DEV Community

Discussion on: Cryptographically protecting your SPA

 
matpk profile image
Matheus Adorni Dardenne

I posted the screenshot showing the correct use.

I'll go through my notifications again, but I've seen no screenshot from you. Just texts.

The browser would have to be webpack in order for you to modify readable code and have it compile into a new working version. To do something remotely similar to what you want, you would have to modify the compiled version, which is not trivial and requires understanding of how React works under the hood. Any attempt at calling this trivial is.......... well, there are no polite ways of saying it, so I won't.

Thread Thread
 
victorwm profile image
Victor Nascimento

Modifying the compiled version is precisely what you need to do. But you don't need to understand how react works under the hood to do that.

It seems to me you're modifying the code translated from source maps and that won't work. As pointed, this is a misunderstanding of how the overrides tool works.

Thread Thread
 
victorwm profile image
Victor Nascimento

It's not because you don't know how to do it that it is not trivial, by the way.

Thread Thread
 
matpk profile image
Matheus Adorni Dardenne

"It seems to me you're modifying the code translated from source maps and that won't work"

Yes. I'm saying that it won't work for some 10 comments by now.

"As pointed, this is a misunderstanding of how the overrides tool works"

Yes, it IS a misunderstanding: of the people suggesting this is as something that trivially works as they naïvely thought. It doesn't. You have to change the compiled code, which is not trivial.