cloudflare / cloudflare/vinext

Edge runtime: `new URL(asset, import.meta.url)` blob/asset imports fail to fetch

Open
#1,824 2 comments 0 reactions 0 assignees View on GitHub
adapter-api-e2e
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.