pub struct ResolveConfig {
pub conditions: Vec<String>,
}Expand description
Module resolver configuration.
Controls how fallow resolves import specifiers against package.json
exports / imports fields and tsconfig paths. Configured via the
resolve section in .fallowrc.json, .fallowrc.jsonc, fallow.toml, or .fallow.toml.
§Examples
{
"resolve": {
"conditions": ["development", "worker"]
}
}Fields§
§conditions: Vec<String>Additional export/import condition names to honor during module
resolution. Merged with fallow’s built-in conditions (development,
import, require, default, types, node; plus react-native
and browser when the React Native or Expo plugin is active).
User conditions are matched with higher priority than the baseline,
so a package.json exports entry like:
{ "./api": { "worker": "./src/api.worker.ts", "import": "./dist/api.js" } }resolves to the worker branch when "worker" is listed here.
See https://nodejs.org/api/packages.html#community-conditions-definitions for the set of community-defined conditions.
Trait Implementations§
Source§impl Clone for ResolveConfig
impl Clone for ResolveConfig
Source§fn clone(&self) -> ResolveConfig
fn clone(&self) -> ResolveConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolveConfig
impl Debug for ResolveConfig
Source§impl Default for ResolveConfig
impl Default for ResolveConfig
Source§fn default() -> ResolveConfig
fn default() -> ResolveConfig
Source§impl<'de> Deserialize<'de> for ResolveConfig
impl<'de> Deserialize<'de> for ResolveConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ResolveConfig
impl JsonSchema for ResolveConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more