Skip to content

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

Merged
sapphi-red merged 2 commits into
mainfrom
03-28-test_glob-import_add_subpath_imports_test_from_sub_directory
Apr 8, 2026
Merged

test(glob-import): add subpath imports test from sub directory#22059
sapphi-red merged 2 commits into
mainfrom
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

@sapphi-red sapphi-red added p1-chore Doesn't change code behavior (priority) test labels Apr 8, 2026
@sapphi-red sapphi-red merged commit 94fd9e7 into main Apr 8, 2026
26 of 29 checks passed
@sapphi-red sapphi-red deleted the 03-28-test_glob-import_add_subpath_imports_test_from_sub_directory branch April 8, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p1-chore Doesn't change code behavior (priority) test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants