We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b23ca8d commit 7396af3Copy full SHA for 7396af3
1 file changed
packages/app/server/plugins/config.ts
@@ -0,0 +1,12 @@
1
+// This plugin ensures runtime config is properly initialized early in the request lifecycle
2
+export default defineNitroPlugin((nitro) => {
3
+ nitro.hooks.hook('request', async (event) => {
4
+ try {
5
+ // Pre-load the configuration to ensure it's initialized
6
+ const config = useRuntimeConfig(event);
7
+ console.log('Runtime config initialized successfully:', Object.keys(config));
8
+ } catch (error) {
9
+ console.error('Failed to initialize runtime config:', error);
10
+ }
11
+ });
12
+});
0 commit comments