silverwolf-x's picture
download
raw
521 Bytes
import 'server-only'
import * as React from 'react'
import { NextResponse } from 'next/server'
// import './lib/mixed-lib'
export function middleware(request) {
// To avoid webpack ESM exports checking warning
const ReactObject = Object(React)
if (ReactObject.useState) {
throw new Error('React.useState should not be defined in server layer')
}
if (request.nextUrl.pathname === '/middleware') {
return Response.json({
React: Object.keys(ReactObject),
})
}
return NextResponse.next()
}

Xet Storage Details

Size:
521 Bytes
·
Xet hash:
0faa49658292904a6c1f7ba7785b35452423b620631344d2e147e70d202e5835

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.