From d8b2aa38e21f274a813d0f8ea8d14c688dd5850e Mon Sep 17 00:00:00 2001 From: AmirSa12 Date: Sun, 1 Feb 2026 14:49:41 +0330 Subject: [PATCH 1/2] fix: build runtime err --- packages/app/server/plugins/config.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/app/server/plugins/config.ts diff --git a/packages/app/server/plugins/config.ts b/packages/app/server/plugins/config.ts new file mode 100644 index 00000000..7c7f7ae3 --- /dev/null +++ b/packages/app/server/plugins/config.ts @@ -0,0 +1,16 @@ +// This plugin ensures runtime config is properly initialized early in the request lifecycle +export default defineNitroPlugin((nitro) => { + nitro.hooks.hook("request", async (event) => { + try { + // Pre-load the configuration to ensure it's initialized + const config = useRuntimeConfig(event); + // eslint-disable-next-line no-console + console.log( + "Runtime config initialized successfully:", + Object.keys(config), + ); + } catch (error) { + console.error("Failed to initialize runtime config:", error); + } + }); +}); \ No newline at end of file From c26bd321fb49db369f7505f11b2bba4a8930536a Mon Sep 17 00:00:00 2001 From: AmirSa12 Date: Sun, 1 Feb 2026 14:52:20 +0330 Subject: [PATCH 2/2] run prettier --- packages/app/server/plugins/config.ts | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/app/server/plugins/config.ts b/packages/app/server/plugins/config.ts index 7c7f7ae3..dd2d7621 100644 --- a/packages/app/server/plugins/config.ts +++ b/packages/app/server/plugins/config.ts @@ -1,16 +1,16 @@ // This plugin ensures runtime config is properly initialized early in the request lifecycle export default defineNitroPlugin((nitro) => { - nitro.hooks.hook("request", async (event) => { - try { - // Pre-load the configuration to ensure it's initialized - const config = useRuntimeConfig(event); - // eslint-disable-next-line no-console - console.log( - "Runtime config initialized successfully:", - Object.keys(config), - ); - } catch (error) { - console.error("Failed to initialize runtime config:", error); - } - }); -}); \ No newline at end of file + nitro.hooks.hook("request", async (event) => { + try { + // Pre-load the configuration to ensure it's initialized + const config = useRuntimeConfig(event); + // eslint-disable-next-line no-console + console.log( + "Runtime config initialized successfully:", + Object.keys(config), + ); + } catch (error) { + console.error("Failed to initialize runtime config:", error); + } + }); +});