/ opencodehub / astro.config.mjs
swadhinbiswas 📦 chore: update .cron-lock · 7/24/2026
de6ba86
40 lines · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import node from "@astrojs/node";
import react from "@astrojs/react";
import { defineConfig } from "astro/config";
import icon from "astro-icon";
import { loadEnv } from "vite";

// Load .env before config reads PORT
const env = loadEnv("development", process.cwd(), "");

export default defineConfig({
  integrations: [
    react(),
    icon(),
  ],
  output: "server",
  adapter: node({
    mode: "standalone",
  }),
  server: {
    port: parseInt(env.PORT || process.env.PORT || "4321"),
    host: true,
  },
  vite: {
    css: {
      transformer: 'postcss',
    },
    server: {
      watch: {
        ignored: ['**/data/**', '**/repos/**', '**/storage/**', '**/.tmp/**', '**/postgres/**', '**/redis/**'],
      },
    },
    optimizeDeps: {
      exclude: ["nodegit", "better-sqlite3"],
    },
    ssr: {
      noExternal: ["@radix-ui/*"],
    },
  },
});