Skip to content

Commit 0281675

Browse files
committed
fix(app): restore runtime config plugin behavior
1 parent 0b59206 commit 0281675

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
// This plugin ensures runtime config is properly initialized early in the request lifecycle
12
export default defineNitroPlugin((nitro) => {
2-
nitro.hooks.hook("request", async () => {});
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+
// eslint-disable-next-line no-console
8+
console.log(
9+
"Runtime config initialized successfully:",
10+
Object.keys(config),
11+
);
12+
} catch (error) {
13+
console.error("Failed to initialize runtime config:", error);
14+
}
15+
});
316
});

0 commit comments

Comments
 (0)