import baseConfig from './vite.config.base.mts';
import type { UserConfigExport, ConfigEnv } from 'vite';

export default ({ mode }: ConfigEnv): UserConfigExport => {
  return {
    mode: 'development',
    server: {
      open: true,
      fs: {
        strict: true
      },
      warmup: {
        // 预热的客户端文件：首页、views、 components
        clientFiles: ['./index.html', './src/{views,components}/*']
      }
    },
    ...baseConfig({ mode } as ConfigEnv)
  };
};
