diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2025-08-14 18:07:12 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2025-08-14 18:07:12 +0100 |
| commit | 4697556cac819c47d068819b9fc9c3b4ea84e279 (patch) | |
| tree | b832d8fc6b643a8b9d0eeca35c1268e1649da731 /web/nuxt.config.ts | |
| parent | dd49c9205bb04844b686b9c3396c40eb49d25826 (diff) | |
Merge confplanner-web and replace fiber with native net/http
Diffstat (limited to 'web/nuxt.config.ts')
| -rw-r--r-- | web/nuxt.config.ts | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/web/nuxt.config.ts b/web/nuxt.config.ts new file mode 100644 index 0000000..dc76af0 --- /dev/null +++ b/web/nuxt.config.ts @@ -0,0 +1,43 @@ +import { execSync } from "child_process"; +let gitSha: string | null = null; +let version: string | null = null; +let revision: string | null = null; +try { + gitSha = execSync("git rev-parse --short=7 HEAD").toString().trim(); + version = execSync("git log -1 --format=%cd --date=format:'%Y%m%d'").toString().trim(); + revision = execSync("git rev-list --count HEAD").toString().trim(); +} catch (e) { + gitSha = "unknown"; + revision = "0" + version = new Date().toISOString().slice(0, 10).replace(/-/g, "."); +} + +export default defineNuxtConfig({ + compatibilityDate: "2024-11-01", + devtools: { enabled: true }, + ssr: true, + css: ["~/assets/css/main.css"], + + runtimeConfig: { + public: { + baseURL: process.env.BASE_URL || "/api", + gitSha: gitSha, + version: version, + revision: revision, + versionString: gitSha === "unknown" ? "(unknown version)" : `v${version}.r${revision}.g${gitSha}` + }, + }, + + vite: { + server: { + proxy: { + "/api": { + target: "http://localhost:4000", + changeOrigin: true, + }, + }, + }, + }, + + modules: ["@pinia/nuxt", "@vite-pwa/nuxt"], +}); |
