I’m using a build command with sed to apply a env variable to my build like so:
[build]
command = "echo \"${LOCATION}\" && sed -i 's#FOO#'\"${LOCATION}\"'#g' netlify.toml && npm run build"
[[redirects]]
from = "/api/*"
to = "FOO/api/:splat"
status = 200
force = true
This seems to be working fine in production, but when I’m running locally with netlify dev
it seems like the build command is not affecting the redirect URL (as in I see Rewrote URL to /FOO/api/something
)
I’m new to netlify, so I’m not even sure if this should work. Thoughts?