24 lines
607 B
TypeScript
24 lines
607 B
TypeScript
import path from 'node:path';
|
|
import { mergeRsbuildConfig } from '../../web/node_modules/@rsbuild/core';
|
|
import baseConfig from '../../web/rsbuild.config';
|
|
|
|
const profiling = process.env.PERF_PROFILING === '1';
|
|
const root = path.resolve(__dirname, '..', '.build', profiling ? 'profiling' : 'prod');
|
|
|
|
export default mergeRsbuildConfig(baseConfig, {
|
|
output: {
|
|
distPath: { root },
|
|
},
|
|
resolve: profiling ? { alias: { 'react-dom$': 'react-dom/profiling' } } : {},
|
|
server: {
|
|
port: 8080,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
ws: true,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|