Write on the margins of the internet. Powered by the AT Protocol. margin.at
extension web atproto comments
at main 42 lines 1.0 kB view raw
1// @ts-check 2import { defineConfig } from "astro/config"; 3import react from "@astrojs/react"; 4import tailwind from "@astrojs/tailwind"; 5import node from "@astrojs/node"; 6 7const API_PORT = process.env.API_PORT || 8081; 8 9const isDev = process.env.NODE_ENV === "development"; 10 11// https://astro.build/config 12export default defineConfig({ 13 adapter: node({ mode: "standalone" }), 14 integrations: [react(), tailwind()], 15 security: { 16 checkOrigin: false, 17 }, 18 vite: { 19 ssr: { 20 noExternal: isDev ? /^(?!react|react-dom|react-router-dom|cookie)/ : true, 21 external: ["@resvg/resvg-js"], 22 }, 23 build: { 24 commonjsOptions: { 25 transformMixedEsModules: true, 26 }, 27 chunkSizeWarningLimit: 1000, 28 }, 29 server: { 30 proxy: { 31 "/api": { 32 target: `http://127.0.0.1:${API_PORT}`, 33 changeOrigin: true, 34 }, 35 "/auth": { 36 target: `http://127.0.0.1:${API_PORT}`, 37 changeOrigin: true, 38 }, 39 }, 40 }, 41 }, 42});