@@ -9,27 +9,23 @@ export default defineConfig({
99 } ,
1010
1111 // Vite optons tailored for Tauri developemnt and only applied in `tauri dev` or `tauri build`
12- ...( process . env . TAURI_DEBUG || process . env . TAURI_BUILD
13- ? {
14- // prevent vite from obscuring rust errors
15- clearScreen : false ,
16- // tauri expects a fixed port, fail if that port is not available
17- server : {
18- port : 1420 ,
19- strictPort : true ,
20- } ,
21- // to make use of `TAURI_DEBUG` and other env variables
22- // https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
23- envPrefix : [ "VITE_" , "TAURI_" ] ,
24- build : {
25- polyfillDynamicImport : false ,
26- // Tauri supports es2021
27- target : [ "es2021" , "chrome100" , "safari13" ] ,
28- // don't minify for debug builds
29- minify : ! process . env . TAURI_DEBUG ? "esbuild" : false ,
30- // produce sourcemaps for debug builds
31- sourcemap : ! ! process . env . TAURI_DEBUG ,
32- } ,
33- }
34- : { } ) ,
12+ // prevent vite from obscuring rust errors
13+ clearScreen : false ,
14+ // tauri expects a fixed port, fail if that port is not available
15+ server : {
16+ port : 1420 ,
17+ strictPort : true ,
18+ } ,
19+ // to make use of `TAURI_DEBUG` and other env variables
20+ // https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
21+ envPrefix : [ "VITE_" , "TAURI_" ] ,
22+ build : {
23+ polyfillDynamicImport : false ,
24+ // Tauri supports es2021
25+ target : [ "es2021" , "chrome100" , "safari13" ] ,
26+ // don't minify for debug builds
27+ minify : ! process . env . TAURI_DEBUG ? "esbuild" : false ,
28+ // produce sourcemaps for debug builds
29+ sourcemap : ! ! process . env . TAURI_DEBUG ,
30+ } ,
3531} ) ;
0 commit comments