- 实现3D可视化性能优化(降低DPR、阴影贴图、简化光源) - 实现LOD多级细节系统,根据相机距离自动切换 - 添加设备弹出动画开关,默认关闭 - 修复设备缩放时位置偏移问题 - 更新README添加项目截图占位符 - 精简DEPLOYMENT.md文档,添加Gitee仓库支持 - 更新CHANGELOG.md记录v1.1.0版本
49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
assetsInclude: ['**/*.hdr', '**/*.woff2'],
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
},
|
|
'/uploads': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: false,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'antd': ['antd', '@ant-design/icons'],
|
|
'vendor': ['react', 'react-dom', 'react-router-dom'],
|
|
'charts': ['axios', 'dayjs'],
|
|
'utils': ['three', 'xlsx']
|
|
},
|
|
chunkFileNames: 'js/[name]-[hash].js',
|
|
entryFileNames: 'js/[name]-[hash].js',
|
|
assetFileNames: '[ext]/[name]-[hash].[ext]',
|
|
compact: true
|
|
}
|
|
},
|
|
minify: 'terser',
|
|
terserOptions: {
|
|
compress: {
|
|
drop_console: true,
|
|
drop_debugger: true
|
|
}
|
|
}
|
|
},
|
|
optimizeDeps: {
|
|
include: ['antd', '@ant-design/icons', 'axios', 'react-router-dom']
|
|
}
|
|
}); |