Deploying to Netlify using create-react-app
.
Add the GENERATE_SOURCEMAP
env
variable to flag no source map. Edit the netlify.toml
to include the variable for use in build contexts.
netlify.toml
[build]
command = "npm run build"
publish = "build"
[build.environment]
GENERATE_SOURCEMAP = "true"
[build.production.environment]
GENERATE_SOURCEMAP = "false"