diff options
Diffstat (limited to 'packages/bun-framework-next/appInjector.js')
| -rw-r--r-- | packages/bun-framework-next/appInjector.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/bun-framework-next/appInjector.js b/packages/bun-framework-next/appInjector.js new file mode 100644 index 000000000..e8bf22d21 --- /dev/null +++ b/packages/bun-framework-next/appInjector.js @@ -0,0 +1,15 @@ +export function maybeInjectApp(expr) { + var app; + try { + const path = Bun.routesDir + "/_app"; + app = Bun.resolveSync(path, Bun.cwd + "/"); + } catch (exception) { + return undefined; + } + + return ( + <> + <import path={app} /> + </> + ); +} |
