使用react-create-app
部署到Netlify。
答案 0 :(得分:1)
添加GENERATE_SOURCEMAP
env
变量以标记无源地图。编辑netlify.toml
以包含用于构建上下文的变量。
netlify.toml
[build]
command = "npm run build"
publish = "build"
[build.environment]
GENERATE_SOURCEMAP = "true"
[build.production.environment]
GENERATE_SOURCEMAP = "false"