Seeing the node modules and webpack folder for a production site in developer tool's source tab

I am seeing node_modules and webpack in the browser developer tool’s sources tab when inspecting a ReactJS application served by Cloudflare Pages. I have manually uploaded the build folder to the Cloudflare Pages. But still seeing these, which shouldn’t be exposed to public right? Even in JS folder I could see all the .jsx files.

It sounds like you included the sourcemap files in your output, which will map the minified code back to your actual code, for easy debugging.

Take a read through the webpack documentation for devtool at Devtool | webpack or simply do not upload the .map files.

2 Likes

Thanks for the info!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.