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 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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ResolveConfig
impl JsonSchema for ResolveConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ResolveConfig
impl RefUnwindSafe for ResolveConfig
impl Send for ResolveConfig
impl Sync for ResolveConfig
impl Unpin for ResolveConfig
impl UnsafeUnpin for ResolveConfig
impl UnwindSafe for ResolveConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more