From ca824a2a1aab3f0ef7043a6f155929783b1df698 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 4 Dec 2024 12:53:43 +0100 Subject: [PATCH] refactor: :recycle: Disable SSR, always build as static --- app.vue | 22 +++++++++------------- nuxt.config.ts | 3 ++- pages/oauth/authorize.vue | 6 +----- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/app.vue b/app.vue index 488004c..8df7ff8 100644 --- a/app.vue +++ b/app.vue @@ -1,19 +1,15 @@ diff --git a/nuxt.config.ts b/nuxt.config.ts index 625ef52..e8ca531 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -9,6 +9,7 @@ export default defineNuxtConfig({ "shadcn-nuxt", "@nuxtjs/color-mode", ], + ssr: false, vue: { compilerOptions: { isCustomElement: (tag) => tag === "iconify-icon", @@ -240,7 +241,7 @@ export default defineNuxtConfig({ keepalive: true, }, nitro: { - preset: "bun", + preset: "static", minify: true, prerender: { failOnError: true, diff --git a/pages/oauth/authorize.vue b/pages/oauth/authorize.vue index eb9d39e..bf82472 100644 --- a/pages/oauth/authorize.vue +++ b/pages/oauth/authorize.vue @@ -6,11 +6,7 @@ import { Alert, AlertDescription, AlertTitle } from "~/components/ui/alert"; import { Button } from "~/components/ui/button"; import { NuxtLink } from "#components"; -const { - public: { apiHost }, -} = useRuntimeConfig(); - -const host = new URL(apiHost).host; +const host = new URL(useBaseUrl().value).host; const instance = useInstanceFromClient(new Client(new URL(useBaseUrl().value))); const { error, error_description } = useUrlSearchParams();