Netlify serving deleted files from a previous deploy


When I first set up netlify on my new project, I hadn’t configured my build directory. As a result, all of the source code from my root directory was uploaded to your cdn being served with every request (obviously wrong). I quickly set the directory to /build and then started getting my minified js bundle. The issue is, I’m still getting served the extraneous source code from the original deployment.

you can see this by inspecting the sources tab in your browser at

How can I fix this? seems like theres no way to delete a previous deploy or clear the cache entirely.

Hey @isaac,

This is not Netlify, this is React.

By default, React will generate source maps including for production builds. To stop this behaviour you need to set GENERATE_SOURCEMAP to false as per Advanced Configuration | Create React App

are you positive? the code shipped is source code and not source maps. Also cant find anything documented that suggests it’d behave this way. when I download the build for my latest deploy through Netlify my source code isn’t included. Also when I do completely local builds, no source code is found in the build folder

So if the source code isn’t in the deployed files, how could/would Netlify display the source to the user in Developer Tools? It isn’t possible.