Skip to content

Commit

Permalink
in debug build: include sourcemap, don't minify JS
Browse files Browse the repository at this point in the history
  • Loading branch information
garbidge authored and franciscoBSalgueiro committed Oct 20, 2023
1 parent 175ea70 commit 895240f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ import react from '@vitejs/plugin-react-swc'
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import { resolve } from 'node:path'

const isDebug: boolean = !!process.env.TAURI_DEBUG;

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), vanillaExtractPlugin()],
server: {
port: 1420
},
build: {
minify: isDebug ? false : 'esbuild',
sourcemap: isDebug ? 'inline' : false,
rollupOptions: {
output: {
entryFileNames: `assets/[name].js`,
Expand Down

0 comments on commit 895240f

Please sign in to comment.