import { defineConfig } from "astro/config";
import svelte from "@astrojs/svelte";
// import astroI18next from "astro-i18next";
import tailwind from "@astrojs/tailwind";
import node from "@astrojs/node";
import mdx from "@astrojs/mdx";
import astroTypesafeAPI from "astro-typesafe-api"


// https://astro.build/config 
export default defineConfig({
  integrations: [svelte(), tailwind(), mdx(), astroTypesafeAPI()],
  outDir: "./dist",
  output: "server",
  adapter: node({
    mode: "middleware",
  }),
	vite: {
		ssr: {
			external: ["@prisma/client"],
			resolve: {
				alias: {
					".prisma/client/index-browser": "./node_modules/.prisma/client/index-browser.js"
				}
			}
		}
	},
  server: {
    port: 3000
  },
  devToolbar: {
    enabled: false
  }
});