Skip to content

Commit c8983b5

Browse files
committed
chore: updated config
1 parent de78f2a commit c8983b5

File tree

2 files changed

+32
-14
lines changed

2 files changed

+32
-14
lines changed

astro.config.mjs

Lines changed: 0 additions & 14 deletions
This file was deleted.

astro.config.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// @ts-check
2+
import { defineConfig } from "astro/config";
3+
4+
import react from "@astrojs/react";
5+
import tailwindcss from "@tailwindcss/vite";
6+
7+
const config = {
8+
local: {
9+
SITE_URL: "http://localhost:4321",
10+
BASE_PATH: "",
11+
},
12+
production: {
13+
SITE_URL: "https://esa-apex.github.io/apex_document_repo/",
14+
BASE_PATH: "",
15+
},
16+
};
17+
18+
const buildTarget = (process.env.BUILD_TARGET ??
19+
"local") as keyof typeof config;
20+
21+
const { SITE_URL, BASE_PATH } = config[buildTarget];
22+
23+
// https://astro.build/config
24+
export default defineConfig({
25+
site: SITE_URL,
26+
base: BASE_PATH,
27+
integrations: [react()],
28+
29+
vite: {
30+
plugins: [tailwindcss()],
31+
},
32+
});

0 commit comments

Comments
 (0)