oxc-resolver / Introduction
https://github.com/oxc-project/oxc-resolver
Rust version of webpack/enhanced-resolve.
The tests are ported from:
- webpack/enhanced-resolve
- tsconfig-path and parcel-resolver for tsconfig-paths
There is a Node.js API which allows to resolve requests according to the Node.js resolving rules (esm / cjs).
Those resolving rules are applied, taking in account:
- module type:
esm:{ "conditionNames": ["node", "import"] }cjs:{ "conditionNames": ["node", "import"] }
browserField:package.json#browsermainFields:package.json#mainpackage.json#module
And a lot of other things that can alter the resolution algorithm.
This crate is widely used by rolldown_resolver.