I find it redundant because I just use my local environment for debugging but I can't find a way to disable source maps completely on localhost.
Here's what I came up with and it semi-works, but instead of not uploading source maps at all it just throws a bunch of errors warning: could not determine a source map reference (Could not auto-detect referenced sourcemap.
export default defineConfig(() => {
const isProduction = process.env.NODE_ENV === 'production';
...
build: {
sourcemap: isProduction,
},
Do I need to do anything else to disable this on the localhost?