kulls
kulls

Reputation: 885

source code visible in the production : create react app

we are using create react app and converted the source js files into chunks. but I can see that chrome inspect source tab shows the actual code. Is this expected behavior ? Or is there any build configuration that I need to configure to that further ? I have attached an image of the result. minified

Upvotes: 4

Views: 3047

Answers (1)

kiranvj
kiranvj

Reputation: 34117

The source code what you see is loaded from the map files as you can see it from the console

enter image description here

You can remove map files from your production server.

Add GENERATE_SOURCEMAP=false in your .env file, so build will not create map files

Upvotes: 10

Related Questions