auth-helpers
auth-helpers copied to clipboard
NextJs - middleware import
Description
'@supabase/auth-helpers-nextjs/middleware'
is not found. I used '@supabase/auth-helpers-nextjs/dist/middleware'
instead. Also, NextJs replaced the middleware API to only have a single root middleware file. New API Link. This might have a breaking change for withMiddlewareAuth
'@supabase/auth-helpers-nextjs/middleware' is not found. I used '@supabase/auth-helpers-nextjs/dist/middleware' instead.
I wonder if that ever worked. Without hacky tricks afaik having path imports is still a nightmare in typescript.
Maybe the "typesVersions" key in package.json is what you are looking for
Not sure I understand how that could help. What could actually help IMO, is if we use the exports fields together with ts 4.7.x - Will give that a try.
hm. I don't get how to make that work.
thanks for the hint reg. typesVersions. Made it work in https://github.com/supabase-community/auth-helpers/pull/170 thanks to this explanation.