diff --git a/vite.config.js b/vite.config.js index f416ad1f5..a529a2544 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,14 +1,17 @@ import { defineConfig } from 'vite'; // import fs from 'vite-plugin-fs'; -export default defineConfig({ - plugins: [/*fs()*/], - server: { host: '0.0.0.0', port: 8000 }, - clearScreen: false, - build: { - minify: 'esbuild', - }, - esbuild: { - keepNames: true, +export default defineConfig(({ mode }) => { + return { + plugins: [/*fs()*/], + server: { host: '0.0.0.0', port: 8000 }, + clearScreen: false, + build: { + minify: 'esbuild', + }, + esbuild: { + pure: mode === 'production' ? [ 'console.log' ] : [], + keepNames: true, + } } })