Cargo Features

[dependencies]
unrspack-resolver = { version = "1.3.0", default-features = false, features = ["fs_cache", "package_json_raw_json_api", "yarn_pnp", "codspeed", "document-features"] }
default = fs_cache, yarn_pnp

These default features are set whenever unrspack-resolver is added without default-features = false somewhere in the dependency tree.

fs_cache default

Provides the FsCache implementation.

Enables serde

derive for Deserialize from package.json

and serde_json

preserve_order: package_json.exports requires order such as ["require", "import", "default"]

Affects unrspack-resolver::FsResolution, unrspack-resolver::Resolver, package_json_serde::PackageJsonSerde

package_json_raw_json_api

Enables the PackageJsonSerde::raw_json API, which returns the package.json with serde_json::Value.

yarn_pnp default = pnp

Yarn Plug'n'Play

Affects file_system::FileSystemOptions.enable_pnp, options::ResolveOptions.enable_pnp

codspeed dev

For codspeed benchmark

Enables codspeed of criterion2

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

pnp yarn_pnp
document-features implicit feature

Enables document-features

document-features:

Extract documentation for the feature flags from comments in Cargo.toml