#Disable source map uploading on localhost?

2 messages · Page 1 of 1 (latest)

humble nest
#

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?

snow nebula
#

What are you using to upload the files? Is it the vite bundler plugin? If you edit the bundler settings to not provide the authtoken variable based on that env, the source map uploading process will be skipped.