feat: 新增 node-frontend-react-class 示例(React 19 类组件,Tengine 托管)

This commit is contained in:
2026-11-15 11:57:21 +08:00
parent 90c3334368
commit cd1c155256
18 changed files with 632 additions and 0 deletions
@@ -0,0 +1,23 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// 纯静态前端:产物由 Tengine 托管,base 用相对路径,部署到任意子路径都能跑
export default defineConfig({
plugins: [react()],
base: './',
server: {
host: '0.0.0.0',
port: 5573,
},
build: {
outDir: 'dist',
sourcemap: false,
rollupOptions: {
output: {
manualChunks: {
react: ['react', 'react-dom'],
},
},
},
},
});