supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Allow auto import of server services in server routes

Open larbish opened this issue 3 years ago • 2 comments

Currently server services need to be imported from virtual import #supabase/server.

Check documentation and code.

Could be a nice UX to allow auto import of those services.

larbish avatar Aug 22 '22 10:08 larbish

@pi0 @Atinux

larbish avatar Aug 22 '22 10:08 larbish

Here is an example how to register auto import presets for nitro: https://stackblitz.com/edit/github-tuyddi?file=module%2Fruntime%2Futils.nitro.ts,module%2Fmodule.ts

(usage is verbose and not depending on hooks, since we are working on some refactors, this is probably safest to implement for nitro at current RC)

pi0 avatar Aug 22 '22 10:08 pi0