| 1234567891011121314151617181920212223242526272829303132333435 |
- import { defineConfig } from 'vite'
- import path from 'path'
- import tailwindcss from '@tailwindcss/vite'
- import react from '@vitejs/plugin-react'
- export default defineConfig({
- base: process.env.VITE_APP_BASE_PATH || '/',
- plugins: [
- // The React and Tailwind plugins are both required for Make, even if
- // Tailwind is not being actively used – do not remove them
- react(),
- tailwindcss(),
- ],
- resolve: {
- alias: {
- // Alias @ to the src directory
- '@': path.resolve(__dirname, './src'),
- },
- },
- // File types to support raw imports. Never add .css, .tsx, or .ts files to this.
- assetsInclude: ['**/*.svg', '**/*.csv'],
- server: {
- port: 5173,
- // 开发期代理 /api 到后端 Spring Boot(8080);生产由 Nginx 反代,无需此配置
- proxy: {
- '/api': {
- target: 'http://localhost:8080',
- changeOrigin: true,
- },
- },
- },
- })
|