feat(depot): add setting run depot at launch

This commit is contained in:
2023-12-17 08:07:44 +07:00
parent ba88a4e0f2
commit 344bdc0c66
10 changed files with 39 additions and 85 deletions

View File

@@ -1,17 +1,9 @@
import react from '@vitejs/plugin-react-swc';
import { defineConfig } from 'vite';
import topLevelAwait from 'vite-plugin-top-level-await';
import viteTsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
plugins: [
react(),
viteTsconfigPaths(),
topLevelAwait({
promiseExportName: '__tla',
promiseImportName: (i) => `__tla_${i}`,
}),
],
plugins: [react(), viteTsconfigPaths()],
envPrefix: ['VITE_', 'TAURI_'],
build: {
target: process.env.TAURI_PLATFORM === 'windows' ? 'chrome105' : 'safari13',