mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
a6d950a445
- Edge Runtime was missing `globalThis.NEXT_CLIENT_ASSET_SUFFIX` at runtime - Prerenders were always running `globalThis.NEXT_CLIENT_ASSET_SUFFIX` set Fixups after #88828
17 lines
396 B
JavaScript
17 lines
396 B
JavaScript
import fs from 'fs'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
import imported from '../../public/vercel.png'
|
|
const url = new URL('../../public/vercel.png', import.meta.url)
|
|
|
|
export function GET(req, res) {
|
|
let size
|
|
try {
|
|
size = fs.readFileSync(fileURLToPath(url)).length
|
|
} catch (e) {
|
|
size = e.message
|
|
}
|
|
|
|
return Response.json({ imported: imported.src, url: url.toString(), size })
|
|
}
|