Skip to content

test(data-url): verify plugins can resolve imports from data URL modules#8443

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/sub-pr-8420
Closed

test(data-url): verify plugins can resolve imports from data URL modules#8443
Copilot wants to merge 3 commits intomainfrom
copilot/sub-pr-8420

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

The check that blocks filesystem resolution of imports from data URL modules lives in the private resolve_id() fallback, which only runs after all plugin resolveId hooks. Plugins already get a chance to resolve such imports; if none does, rolldown throws UNRESOLVED_IMPORT.

Changes

  • New test plugin_can_resolve_import_from_data_url_module: explicitly verifies a plugin can successfully intercept and resolve an import originating from a data URL module
// Plugin resolves './helper' when importer is a data URL module
if args.specifier == "./helper"
  && args.importer.is_some_and(|id| id.starts_with("\0rolldown/data-url:"))
{
  return Ok(Some(HookResolveIdOutput { id: VIRTUAL_HELPER.into(), ..Default::default() }));
}

Complements the existing loader_data_url_text_java_script_cannot_import fixture that covers the error path when no plugin resolves the import.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update user error handling for data URL modules test(data-url): verify plugins can resolve imports from data URL modules Feb 24, 2026
Copilot AI requested a review from hyf0 February 24, 2026 12:44
@hyf0 hyf0 force-pushed the 02-22-feat_rust_data-url_use_hash_as_id_for_data_url_modules_to_prevent_long_string_overhead branch from d18a000 to e8c3e87 Compare February 24, 2026 13:11
@graphite-app graphite-app bot force-pushed the 02-22-feat_rust_data-url_use_hash_as_id_for_data_url_modules_to_prevent_long_string_overhead branch from e8c3e87 to 4776b5c Compare February 24, 2026 13:28
Base automatically changed from 02-22-feat_rust_data-url_use_hash_as_id_for_data_url_modules_to_prevent_long_string_overhead to main February 24, 2026 13:38
@hyf0 hyf0 closed this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants