swc_css_prefixer/
options.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use preset_env_base::query::Query;
pub use preset_env_base::query::Targets;
use serde::Deserialize;

#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
#[serde(deny_unknown_fields)]
pub struct Options {
    #[serde(default = "default_targets")]
    pub env: Option<Targets>,
}

fn default_targets() -> Option<Targets> {
    Some(Targets::Query(Query::Single("".into())))
}

impl Default for Options {
    fn default() -> Self {
        Self {
            env: default_targets(),
        }
    }
}