/ opencodehub / astro.config.mjs
swadhinbiswas feat(obs): per-request correlation IDs; fix org-owned repos in list endpoints · 8/15/2026
962ac21
42 lines · 856 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
41
42
import node from "@astrojs/node";
import react from "@astrojs/react";
import { defineConfig } from "astro/config";
import icon from "astro-icon";

import { config } from "dotenv";
config();
// Load environment variables safely
const port = parseInt(process.env.PORT || "4321");

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