nitro
nitro copied to clipboard
feat: resolve actual subpaths before guessing
🔗 Linked issue
❓ Type of change
- [ ] 📖 Documentation (updates to the documentation or readme)
- [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
- [x] 👌 Enhancement (improving an existing functionality like performance)
- [ ] ✨ New feature (a non-breaking change that adds functionality)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
📚 Description
This resolves actual subpaths rather than guessing, so (for example) node-fetch-native/dist/polyfill.mjs
can correctly be resolved to node-fetch-native/polyfill
and back again.
📝 Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Codecov Report
Merging #527 (ee6ea64) into main (2049def) will decrease coverage by
0.33%
. The diff coverage is55.88%
.
@@ Coverage Diff @@
## main #527 +/- ##
==========================================
- Coverage 63.96% 63.62% -0.34%
==========================================
Files 55 55
Lines 3644 3665 +21
Branches 400 406 +6
==========================================
+ Hits 2331 2332 +1
- Misses 1299 1317 +18
- Partials 14 16 +2
Impacted Files | Coverage Δ | |
---|---|---|
src/rollup/plugins/externals.ts | 82.22% <55.88%> (-6.12%) |
:arrow_down: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
If you like this approach we can also extract into a mlly
util.
A refactor to mlly would be nice idea for reverse resolving subpaths 👍🏼
extracted:
- [ ] https://github.com/unjs/pkg-types/pull/47
- [ ] https://github.com/unjs/mlly/pull/89