import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'

// https://vite.dev/config/
export default defineConfig(({ mode }) => ({
  plugins: [react(), tailwindcss()],
  // 生产环境使用 /life-script/ 路径，开发环境使用根路径
  base: mode === 'production' ? '/life-script/' : '/',
  server: {
    port: 3000
  }
}))
