DEV Community

Obfuscating your create react app and routes

Petra Grunheidt on January 17, 2024

This week, I was tasked with enhancing the security of our Create React App by employing obfuscation and minification techniques. Obfuscation, as ...
Collapse
 
jackmellis profile image
Jack

This is really interesting but it's a whole lot of effort when obfuscation is the lowest form of security. Any decent hacker who wants to delve into your source code would not be put off by minified code - a mild inconvenience at best.

It's much safer and easier to just ensure your UI code doesn't contain sensitive information in the first place.

Collapse
 
petragrunheidt profile image
Petra Grunheidt • Edited

There are actually two points in this post, one about the obfuscation/minification. I agree that this part is a minor inconvenience.

The second part (splitting the build code into chunks) i find the most important/interesting in the context of a single page application, since, before this implementation, it was possible to access the source code of authenticated routes from the main.*.js

Collapse
 
garoazinha profile image
Mariana Souza

another BANGER

Some comments have been hidden by the post's author - find out more