update config

This commit is contained in:
Ren Amamiya
2023-04-24 13:51:59 +07:00
parent 0a56b85492
commit ce8fd685f3
4 changed files with 27 additions and 4 deletions

View File

@@ -5,6 +5,19 @@ import topLevelAwait from 'vite-plugin-top-level-await';
import viteTsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
clearScreen: false,
server: {
strictPort: true,
},
envPrefix: ['VITE_', 'TAURI_'],
build: {
// Tauri uses Chromium on Windows and WebKit on macOS and Linux
target: process.env.TAURI_PLATFORM == 'windows' ? 'chrome105' : 'safari13',
// don't minify for debug builds
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
// produce sourcemaps for debug builds
sourcemap: !!process.env.TAURI_DEBUG,
},
plugins: [
react(),
ssr({ prerender: true }),
@@ -14,7 +27,4 @@ export default defineConfig({
promiseImportName: (i) => `__tla_${i}`,
}),
],
define: {
global: 'window',
},
});