Skip to content

Commit

Permalink
Add esbuild drop console
Browse files Browse the repository at this point in the history
  • Loading branch information
the-illarionov committed Apr 19, 2024
1 parent f8c7886 commit ea1357f
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ import vue from '@vitejs/plugin-vue'
import VueDevTools from 'vite-plugin-vue-devtools'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
VueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
export default defineConfig(({ mode }) => {
return {
plugins: [
vue(),
VueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
},
// @ts-expect-error vitest
test: {
environment: 'jsdom',
exclude: [...configDefaults.exclude, 'e2e/*'],
root: fileURLToPath(new URL('./', import.meta.url)),
},
test: {
environment: 'jsdom',
exclude: [...configDefaults.exclude, 'e2e/*'],
root: fileURLToPath(new URL('./', import.meta.url)),
},
esbuild: {
drop: mode === 'production' ? ['console'] : [],
},
}
})

0 comments on commit ea1357f

Please sign in to comment.