Files
chat_app/frontend
2025-12-15 17:44:35 +08:00
..
2025-12-06 16:03:18 +08:00
2025-12-15 17:44:35 +08:00
2025-12-11 03:53:47 +08:00
2025-12-11 03:53:47 +08:00
2025-12-06 16:03:18 +08:00
2025-12-11 03:53:47 +08:00
2025-12-12 03:29:09 +08:00
2025-12-12 03:29:09 +08:00
2025-12-06 16:03:18 +08:00
2025-12-12 03:29:09 +08:00

React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.

环境变量配置

本项目使用环境变量来配置 API 基础地址。

配置说明

  1. 复制 .env.example 文件为 .env:

    cp .env.example .env
    
  2. 编辑 .env 文件,设置您的 API 基础地址:

    VITE_API_BASE_URL=http://your-api-server.com/api
    
  3. 环境变量以 VITE_ 开头才能在客户端代码中访问

可用环境变量

  • VITE_API_BASE_URL: API 服务器的基础地址

开发说明

  • 环境变量在开发服务器重启后生效
  • 生产环境部署时,请确保正确设置环境变量