cloudflare / cloudflare/vinext
Edge runtime: `new URL(asset, import.meta.url)` blob/asset imports fail to fetch
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 406
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 120
Description
> *This issue was created by an agent auditing CI failures from the [Next.js Deploy Suite](https://github.com/cloudflare/vinext/actions/runs/27113612207) (vinext `main` vs Next.js `v16.2.6`, 2026-06-08).*
## Problem
The edge compiler cannot import static/blob assets via `new URL('./asset', import.meta.url)` and fetch them at runtime. The entire `edge-compiler-can-import-blob-assets` suite fails (0 passing), so asset-as-URL resolution in the edge build is effectively unimplemented.
## Affected Test Suites
- `test/e2e/edge-compiler-can-import-blob-assets/index.test.ts` (5 failures)
- allows to fetch a remote URL
- allows to fetch a remote URL with a path and basename
- allows to fetch text assets
- allows to fetch image assets
- allows to fetch assets from node_modules
## Estimated impact
~5 e2e failures.
## Recommendation
1. Reproduce: an edge route that does `const url = new URL('./data.txt', import.meta.url); await fetch(url)` and assert the asset bytes come back.
2. Ensure the edge build emits referenced assets and rewrites `new URL(..., import.meta.url)` to a resolvable runtime URL (including assets pulled from `node_modules`).
Contributor guide
Assessment
This issue has not been assessed yet.