Janpot/next-rpc

Cannot use context and _middleware in Next `12.1.6`

Closed this issue · 0 comments

Enabling context on latest next with a _middleware file will throw on build

Module not found: Can't resolve 'async_hooks' in '/vercel/path0/node_modules/.pnpm/next-rpc@3.4.3_next@12.1.6/node_modules/next-rpc/dist'

This is because the _middleware file is treated as a page in babel plugin and latest next throws if the _middleware file imports stuff from node built ins