Skip to content

test(glob-import): add subpath imports test from sub directory#22059

Draft
shulaoda wants to merge 1 commit intomainfrom
03-28-test_glob-import_add_subpath_imports_test_from_sub_directory
Draft

test(glob-import): add subpath imports test from sub directory#22059
shulaoda wants to merge 1 commit intomainfrom
03-28-test_glob-import_add_subpath_imports_test_from_sub_directory

Conversation

@shulaoda
Copy link
Copy Markdown
Member

@shulaoda shulaoda commented Mar 28, 2026

Related to rolldown/rolldown#8884

Summary

Add a test case for import.meta.glob with subpath imports (#imports/*) resolved from a sub directory, ensuring glob patterns using subpath imports work correctly regardless of the importing file's location.

Details

  • Added playground/glob-import/subpath-imports-sub/index.js which uses import.meta.glob('#imports/*', { eager: true }) from a nested directory.
  • Updated index.html to import and render the result from the new sub directory module.
  • Added a corresponding test assertion in glob-import.spec.ts to verify the output matches 'bar foo'.

Test plan

  • Existing glob-import tests continue to pass
  • New subpath imports (sub dir) test verifies that subpath imports resolve correctly when used from a sub directory

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.

1 participant