After taking a look at my React application in Chrome Developer Tools, I noticed that the Sources
tab reveals a folder called static/js
where the entire code of my project is visible. This discovery raised some red flags regarding security.
To address this concern, I tried setting GENERATE_SOURCEMAP=false
, which successfully hid the code for .js
files. However, the .css
files in the static
folder were still accessible in the Sources
tab.
build: set \"GENERATE_SOURCEMAP=false\" && react-scripts build
How can I go about minifying the css files? Does GENERATE_SOURCEMAP only minify js files? Is there a way to prevent the exposure of my React app's source code and enhance security through obfuscation or hiding techniques?
Thank you for any assistance you can provide!