vite.config.js 497 B

1234567891011121314151617181920
  1. import { defineConfig } from 'vite'
  2. import react from '@vitejs/plugin-react'
  3. import path from 'node:path'
  4. // https://vite.dev/config/
  5. export default defineConfig({
  6. plugins: [react()],
  7. resolve: {
  8. alias: {
  9. // Live2D Cubism Framework 源码别名,对应 @framework/...
  10. '@framework': path.resolve(__dirname, './src/live2d/Framework/src'),
  11. },
  12. },
  13. server: {
  14. port: 3000,
  15. proxy: {
  16. '/api': { target: 'http://localhost:5000', changeOrigin: true },
  17. },
  18. },
  19. })