with Hydrogen, how to disable source map on production build?

with Hydrogen, how to disable source map on production build?

doughnut-hole
Shopify Partner
5 1 1

Hello.

 

I'm working on a website with Hydrogen, and I wonder if it's possible to disable to generate source maps on a production build.

I added an option in a vite.config.js file like this:

 

export default defineConfig(({mode}) => ({
......
  build: {
    sourcemap: mode !== 'production',
  },

// or just set false
  build: {
    sourcemap: false,
  },
......

 

 

Simply it's not working, however.

How can I correct it?

 

Best Regards,

K

Replies 0 (0)