fix: allow resolving package?query#fragment for packages with exports field#655
Conversation
How to use the Graphite Merge QueueAdd the label merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #655 +/- ##
==========================================
- Coverage 94.97% 94.95% -0.02%
==========================================
Files 12 12
Lines 2824 2816 -8
==========================================
- Hits 2682 2674 -8
Misses 142 142 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #655 will not alter performanceComparing Summary
|
Merge activity
|
…ts field (#655) Resolving `package?query#fragment` to packages with exports field is allowed in Vite to allow things like `css-package?url`, `wasm-package?init`. This was not allowed by oxc-resolver and this PR allows that. The current behavior of oxc-resolver comes from this change in enhanced-resolve (webpack/enhanced-resolve#225). This PR adds tests that disallows `pkg?foo` but allows `pkg/nested?foo`. This current behavior doesn't make sense to me. Both `pkg?foo` and `pkg/nested?foo` are not allowed by Node and I don't find a reason to treat them differently. fixes vitejs/rolldown-vite#382 refs 97dfb1a
921171e to
6f7e505
Compare
23eeae2 to
c635417
Compare

Resolving
package?query#fragmentto packages with exports field is allowed in Vite to allow things likecss-package?url,wasm-package?init. This was not allowed by oxc-resolver and this PR allows that.The current behavior of oxc-resolver comes from this change in enhanced-resolve (webpack/enhanced-resolve#225). This PR adds tests that disallows
pkg?foobut allowspkg/nested?foo.This current behavior doesn't make sense to me. Both
pkg?fooandpkg/nested?fooare not allowed by Node and I don't find a reason to treat them differently.fixes vitejs/rolldown-vite#382
refs 97dfb1a