①vite build sourcemap: false,防止源码泄露 ②tos_client.py 文件去重哈希从 MD5 改为 SHA256 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
513 B
TypeScript
27 lines
513 B
TypeScript
/// <reference types="vitest" />
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
build: {
|
|
sourcemap: false,
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://127.0.0.1:8000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: './test/setup.ts',
|
|
css: true,
|
|
exclude: ['test/e2e/**', 'node_modules/**'],
|
|
isolate: true,
|
|
},
|
|
})
|