Skip to content

fix(rolldown_plugin_vite_import_glob): follow symlinks in file scanning#9000

Merged
shulaoda merged 3 commits into
mainfrom
copilot/fix-vite-import-glob-symlink-support
Apr 7, 2026
Merged

fix(rolldown_plugin_vite_import_glob): follow symlinks in file scanning#9000
shulaoda merged 3 commits into
mainfrom
copilot/fix-vite-import-glob-symlink-support

Conversation

Copilot AI commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

builtin:vite-import-glob uses walkdir::WalkDir without .follow_links(true), so glob patterns traversing symlinked directories silently return empty results during build — while Vite's dev server (using tinyglobby with followSymbolicLinks: true) resolves them correctly.

Changes

  • crates/rolldown_plugin_vite_import_glob/src/utils.rs: Add .follow_links(true) to the WalkDir builder used for file scanning.
  • packages/rolldown/tests/fixtures/builtin-plugin/import-glob/follow-symlinks/: New test fixture with a real directory symlinked under linked/my-lib → ../packages/my-lib, asserting that import.meta.glob('./linked/*/components/*.js') resolves files through the symlink.
// Previously returned {} during build when components/ is behind a symlink
const mods = import.meta.glob('/linked/*/components/*.js', { eager: true })

@netlify

netlify Bot commented Apr 4, 2026

Copy link
Copy Markdown

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit b92ac7e
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69d4671bd728270007ab9a60

Copilot AI changed the title [WIP] Fix builtin:vite-import-glob to follow symbolic links during file scanning fix: follow symlinks in builtin:vite-import-glob file scanning Apr 4, 2026
Copilot AI requested a review from shulaoda April 4, 2026 15:02
@pkg-pr-new

pkg-pr-new Bot commented Apr 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@rolldown/browser

npm i https://pkg.pr.new/@rolldown/browser@9000

@rolldown/debug

npm i https://pkg.pr.new/@rolldown/debug@9000

@rolldown/pluginutils

npm i https://pkg.pr.new/@rolldown/pluginutils@9000

rolldown

npm i https://pkg.pr.new/rolldown@9000

@rolldown/binding-android-arm64

npm i https://pkg.pr.new/@rolldown/binding-android-arm64@9000

@rolldown/binding-darwin-arm64

npm i https://pkg.pr.new/@rolldown/binding-darwin-arm64@9000

@rolldown/binding-darwin-x64

npm i https://pkg.pr.new/@rolldown/binding-darwin-x64@9000

@rolldown/binding-freebsd-x64

npm i https://pkg.pr.new/@rolldown/binding-freebsd-x64@9000

@rolldown/binding-linux-arm-gnueabihf

npm i https://pkg.pr.new/@rolldown/binding-linux-arm-gnueabihf@9000

@rolldown/binding-linux-arm64-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-arm64-gnu@9000

@rolldown/binding-linux-arm64-musl

npm i https://pkg.pr.new/@rolldown/binding-linux-arm64-musl@9000

@rolldown/binding-linux-ppc64-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-ppc64-gnu@9000

@rolldown/binding-linux-s390x-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-s390x-gnu@9000

@rolldown/binding-linux-x64-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-x64-gnu@9000

@rolldown/binding-linux-x64-musl

npm i https://pkg.pr.new/@rolldown/binding-linux-x64-musl@9000

@rolldown/binding-openharmony-arm64

npm i https://pkg.pr.new/@rolldown/binding-openharmony-arm64@9000

@rolldown/binding-wasm32-wasi

npm i https://pkg.pr.new/@rolldown/binding-wasm32-wasi@9000

@rolldown/binding-win32-arm64-msvc

npm i https://pkg.pr.new/@rolldown/binding-win32-arm64-msvc@9000

@rolldown/binding-win32-x64-msvc

npm i https://pkg.pr.new/@rolldown/binding-win32-x64-msvc@9000

commit: 985bc3b

@shulaoda shulaoda marked this pull request as ready for review April 7, 2026 02:08
@codspeed-hq

codspeed-hq Bot commented Apr 7, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing copilot/fix-vite-import-glob-symlink-support (b92ac7e) with main (fb007e4)2

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (4976794) during the generation of this report, so fb007e4 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@shulaoda shulaoda merged commit 1a9884e into main Apr 7, 2026
31 checks passed
@shulaoda shulaoda deleted the copilot/fix-vite-import-glob-symlink-support branch April 7, 2026 02:27
@shulaoda shulaoda changed the title fix: follow symlinks in builtin:vite-import-glob file scanning fix(rolldown_plugin_vite_import_glob): follow symlinks in builtin:vite-import-glob file scanning Apr 7, 2026
@shulaoda shulaoda changed the title fix(rolldown_plugin_vite_import_glob): follow symlinks in builtin:vite-import-glob file scanning fix(rolldown_plugin_vite_import_glob): follow symlinks in file scanning Apr 7, 2026
This was referenced Apr 8, 2026
shulaoda added a commit that referenced this pull request Apr 8, 2026
## [1.0.0-rc.14] - 2026-04-08

### 🚀 Features

- rust: add `disable_panic_hook` feature to disable the panic hook (#9023) by @sapphi-red
- support inlineConst for CJS exports accessed through module.exports (#8976) by @h-a-n-a

### 🐛 Bug Fixes

- rolldown_plugin_vite_import_glob: normalize resolved alias path to prevent double slashes (#9032) by @shulaoda
- rolldown_plugin_vite_import_glob: follow symlinks in file scanning (#9000) by @Copilot
- wrap CJS entry modules for IIFE/UMD when using exports/module (#8999) by @IWANABETHATGUY
- emit separate __toESM bindings for mixed ESM/CJS external imports (#8987) by @IWANABETHATGUY
- tree-shake dead dynamic imports to side-effect-free CJS modules (#8529) by @sapphi-red
- skip inlining stale CJS export constants on module.exports reassignment (#8990) by @IWANABETHATGUY

### 🚜 Refactor

- generator: migrate ecma formatting from npx oxfmt to vp fmt (#9022) by @shulaoda
- generator: replace npx oxfmt with vp fmt for ecma formatting (#9021) by @shulaoda

### 📚 Documentation

- contrib-guide: mention that running tests on older Node.js version will have different stat results (#8996) by @claude

### ⚙️ Miscellaneous Tasks

- deps: update npm packages (#9002) by @renovate[bot]
- deps: update dependency @napi-rs/cli to v3.6.1 (#9034) by @renovate[bot]
- deps: upgrade oxc to 0.124.0 (#9018) by @shulaoda
- deps: update test262 submodule for tests (#9010) by @sapphi-red
- deps: update dependency oxfmt to ^0.44.0 (#9012) by @renovate[bot]
- deps: update dependency vite to v8.0.5 [security] (#9009) by @renovate[bot]
- deps: update dependency vite-plus to v0.1.16 (#9008) by @renovate[bot]
- deps: update rust crates (#9003) by @renovate[bot]
- deps: update github-actions (#9004) by @renovate[bot]
- deps: update dependency lodash-es to v4.18.1 [security] (#8992) by @renovate[bot]
- deps: update crate-ci/typos action to v1.45.0 (#8988) by @renovate[bot]
- upgrade oxc npm packages to 0.123.0 (#8985) by @shulaoda

### ◀️ Revert

- "chore(deps): update dependency oxfmt to ^0.44.0 (#9012)" (#9019) by @shulaoda

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: builtin:vite-import-glob does not follow symbolic links during file scanning

2 participants