123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import tailwindcss from '@tailwindcss/vite'
-
- import path from 'node:path'
- import ElementPlus from 'unplugin-element-plus/vite'
-
- const host = process.env.TAURI_DEV_HOST
- export default defineConfig(async () => ({
- resolve: {
- alias: {
-
- '@': path.join(process.cwd(), './src'),
- },
- },
- plugins: [
- vue(),
- tailwindcss(),
- ElementPlus({
- useSource: true,
- }),
- ],
-
-
-
- clearScreen: false,
-
- server: {
- port: 1420,
- strictPort: true,
- host: host || false,
- hmr: host
- ? {
- protocol: 'ws',
- host,
- port: 1421,
- }
- : undefined,
- watch: {
-
- ignored: ['**/src-tauri/**'],
- },
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- },
- }))
|