/// <reference path="./tsconfig.node.json" />
// @ts-nocheck
import { defineConfig } from '@rspack/cli';
import { merge } from 'webpack-merge';
import { baseConfig } from './rspack.base.config';

export default defineConfig(
  merge(baseConfig, {
    mode: 'development',
    entry: {
      main: './src/main.ts',
    },
    devtool: 'eval-cheap-module-source-map',
    devServer: {
      hot: true,
      port: 8093,
      open: true,
      historyApiFallback: true,
      proxy: [
        {
          context: ['/api'],
          target: 'http://localhost:3000',
          changeOrigin: true,
          pathRewrite: {
            '^/api': '',
          },
        },
      ],
    },
  }),
);
