Migrate from Create React App to Vite
All checks were successful
Deploy HiHala Dashboard / deploy (push) Successful in 7s
All checks were successful
Deploy HiHala Dashboard / deploy (push) Successful in 7s
CRA (react-scripts 5.0.1) is abandoned and incompatible with TypeScript 5.x. Vite provides faster builds, active maintenance, and native TS5 support. - Replace react-scripts with vite + @vitejs/plugin-react - Move index.html to root with script module entry point - Replace setupProxy.js with vite.config.ts proxy config - Rename env vars from REACT_APP_ to VITE_ prefix - Update tsconfig for bundler module resolution - Add nginx setup script for deployment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
18
vite.config.ts
Normal file
18
vite.config.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 3000,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8090',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: 'build',
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user