vite.config.ts 680 B

123456789101112131415161718192021
  1. import {defineConfig} from "vite";
  2. import vue from "@vitejs/plugin-vue";
  3. // https://vitejs.dev/config/
  4. export default defineConfig(async () => ({
  5. plugins: [
  6. vue(),
  7. ],
  8. // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
  9. //
  10. // 1. prevent vite from obscuring rust errors
  11. clearScreen: false,
  12. // 2. tauri expects a fixed port, fail if that port is not available
  13. server: {
  14. port: 1420,
  15. strictPort: true,
  16. },
  17. // 3. to make use of `TAURI_DEBUG` and other env variables
  18. // https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
  19. envPrefix: ["VITE_", "TAURI_"],
  20. }));