Skip to content

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

@james-elicx

Description

@james-elicx

This issue was created by an agent auditing CI failures from the Next.js Deploy Suite (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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions