mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This fixes a "bug" where Sentry was trying to access some of the internal async storages and it would fail because their imports would be compiled as-is instead of using the special rules for Next externals as we are short-cutting it for `next/dist` requests for some reason. Not a bug per se because this is technically an undocumented API but I think it's a reasonable fix since we don't provide an API for that. The alternative for them would be to try to play around with the bundling, which is not a good use of anyone's time.
9 lines
287 B
JavaScript
9 lines
287 B
JavaScript
import { requestAsyncStorage } from 'next/dist/client/components/request-async-storage.external'
|
|
|
|
export default async function Page() {
|
|
// cookies is undefined if not set
|
|
return !!requestAsyncStorage.getStore().cookies ? 'success' : 'fail'
|
|
}
|
|
|
|
export const dynamic = 'force-dynamic'
|