import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
  plugins: [
    remix({
      future: {
        v3_fetcherPersist: true,
        v3_relativeSplatPath: true,
        v3_throwAbortReason: true,
      },
    }),
    tsconfigPaths(),
  ],
  server: {
    open: true,
  },
  test: {
    fileParallelism: false,
    setupFiles: ["./tests/setup-tests.ts"],
    coverage: {
      enabled: true,
      include: ["app/modules/**/**"],
      thresholds: {
        "100": true,
      },
    },
  },
});
