import { mergeConfig, loadEnv } from 'vite';
// import eslint from 'vite-plugin-eslint';
import baseConfig from './vite.config.base';

const env = loadEnv('development', process.cwd(), '');

export default mergeConfig(
  {
    mode: 'development',
    server: {
      port: 8150,
      open: false,
      fs: {
        strict: false,
      },
      proxy: {
        '/api/': env.VUE_APP_DEV_PROXY,
      },
      hmr: {
        overlay: false,
      },
      host: '0.0.0.0',
    },
    // plugins: [
    //   eslint({
    //     cache: false,
    //     include: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.vue'],
    //     exclude: ['node_modules'],
    //   }),
    // ],
  },
  baseConfig
);
