21 lines
565 B
TypeScript
21 lines
565 B
TypeScript
import { defineConfig } from "vite";
|
|
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
|
import basicSsl from '@vitejs/plugin-basic-ssl';
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
process.env.VITE_USE_SSL === 'true' ? basicSsl() : [],
|
|
svelte(),
|
|
],
|
|
// Prevent vite from obscuring rust errors
|
|
clearScreen: false,
|
|
base: "./",
|
|
// Tauri expects a fixed port, fail if that port is not available
|
|
server: {
|
|
strictPort: true,
|
|
port: process.env.VITE_USE_SSL === 'true' ? 5174 : 5173,
|
|
host: "0.0.0.0",
|
|
},
|
|
});
|