Files
astro_name_numbers/vite.config.js

30 lines
933 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [vue()],
// Фиксируем порт, чтобы Tauri всегда знал, куда подключаться
server: {
port: 5173,
strictPort: true, // упасть с ошибкой, если порт занят, а не искать другой
host: '127.0.0.1',
watch: {
// НЕ вотчим папку Rust-сборки — она постоянно меняется и блокирует файлы
ignored: ['**/src-tauri/**', '**/target/**']
}
},
// Чтобы в продакшне пути были корректными
build: {
emptyOutDir: true
},
// Для Tauri v2 важно, чтобы превью тоже было на известном порту
preview: {
port: 4173,
strictPort: true,
host: '127.0.0.1'
}
});