fix(code-splitting): stop negated sideEffects globs retaining modules - #10660
Merged
IWANABETHATGUY merged 4 commits intoAug 11, 2026
Merged
Conversation
JoviDeCroock
requested review from
IWANABETHATGUY,
hyfdev and
shulaoda
as code owners
August 10, 2026 15:56
Merging this PR will not alter performance
Comparing Footnotes
|
JoviDeCroock
force-pushed
the
fix/negated-side-effects-globs
branch
from
August 11, 2026 04:13
3780588 to
e4df07b
Compare
IWANABETHATGUY
approved these changes
Aug 11, 2026
IWANABETHATGUY
enabled auto-merge (squash)
August 11, 2026 04:25
Package sideEffects patterns form a positive allowlist, but fast_glob interprets a leading exclamation mark as a negation. Passing those patterns through made each one match nearly every unrelated module and prevented affected packages from tree-shaking. Ignore leading-bang string and array patterns before matching, and cover the behavior with a generic unit and integration regression.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`!foo.js` is a legal POSIX path, and Rollup with @rollup/plugin-node-resolve matches such a `sideEffects` entry literally. Escape the `!` before handing the normalized pattern to fast_glob so it stays a literal match, rather than filtering leading-bang patterns out entirely. Co-Authored-By: IWANABETHATGUY <iwanabethatguy@qq.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
IWANABETHATGUY
force-pushed
the
fix/negated-side-effects-globs
branch
from
August 11, 2026 04:25
e4df07b to
f5820c3
Compare
✅ Deploy Preview for rolldown-rs canceled.
|
IWANABETHATGUY
approved these changes
Aug 11, 2026
Merged
shulaoda
added a commit
that referenced
this pull request
Aug 12, 2026
## [1.2.4] - 2026-08-12 ### 🚀 Features - code-splitting: widen namespace extraction for already-loaded merges (#10594) by @IWANABETHATGUY ### 🐛 Bug Fixes - binding: illegal instruction crash on Android arm64 (#10638) by @shulaoda - code-splitting: stop negated sideEffects globs retaining modules (#10660) by @JoviDeCroock - devtools: resolve log paths against the build cwd (#10622) by @hyfdev ### 📚 Documentation - plugin-api: document sourcemap differences from Rollup (#10636) by @IWANABETHATGUY ### 🧪 Testing - browser: smoke test the packed `@rolldown/browser` in a real browser page (#10634) by @hyfdev - node-wasi: run the full node test suite against the WASI binding (#10616) by @hyfdev - webcontainer: smoke test the packed WASI artifacts inside a WebContainer (#10626) by @hyfdev ### ⚙️ Miscellaneous Tasks - deps: update napi (#10649) by @renovate[bot] - deps: update esbuild for tests to 0.28.2 (#10662) by @rolldown-guard[bot] - deps: update test262 submodule for tests (#10663) by @rolldown-guard[bot] - deps: update npm packages (#10653) by @renovate[bot] - deps: update github actions (#10651) by @renovate[bot] - deps: update crate-ci/typos action to v1.49.0 (#10642) by @renovate[bot] - deps: update dependency vite-plus to v0.2.9 (#10627) by @renovate[bot] - deps: update rust crates (#10652) by @renovate[bot] - deps: upgrade oxc to 0.144.0 (#10657) by @camc314 - ignore napi-rs temp files (#10658) by @camc314 - deps: tighten `@napi-rs/wasm-runtime` range to `~1.2.2` (#10615) by @hyfdev - wasi: point the wasm skips at the right place (#10644) by @hyfdev Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Package sideEffects patterns form a positive allowlist, but fast_glob interprets a leading exclamation mark as a negation. Passing those patterns through made each one match nearly every unrelated module and prevented affected packages from tree-shaking.
Ignore leading-bang string and array patterns before matching, and cover the behavior with a generic unit and integration regression.
Note
This reproduction was created by a human, implemented by GPT5.6-sol and reviewed by a human