mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Case was absent from the react-server condition test suite but relevant to double check for an upcoming refactor
20 lines
605 B
TypeScript
20 lines
605 B
TypeScript
import type { NextApiRequest, NextApiResponse } from 'next'
|
|
import * as react from 'library-with-exports/react'
|
|
import * as serverFavoringBrowser from 'library-with-exports/server-favoring-browser'
|
|
import * as serverFavoringEdge from 'library-with-exports/server-favoring-edge'
|
|
|
|
export const config = {
|
|
runtime: 'nodejs',
|
|
}
|
|
|
|
export default function handler(
|
|
request: NextApiRequest,
|
|
response: NextApiResponse
|
|
) {
|
|
return response.status(200).json({
|
|
react: react.condition,
|
|
serverFavoringBrowser: serverFavoringBrowser.condition,
|
|
serverFavoringEdge: serverFavoringEdge.condition,
|
|
})
|
|
}
|