Struct swc_ecma_minifier::option::CompressOptions
source · [−]pub struct CompressOptions {Show 52 fields
pub arguments: bool,
pub arrows: bool,
pub bools: bool,
pub bools_as_ints: bool,
pub collapse_vars: bool,
pub comparisons: bool,
pub computed_props: bool,
pub conditionals: bool,
pub dead_code: bool,
pub directives: bool,
pub drop_console: bool,
pub drop_debugger: bool,
pub ecma: EsVersion,
pub evaluate: bool,
pub expr: bool,
pub global_defs: AHashMap<Box<Expr>, Box<Expr>>,
pub hoist_fns: bool,
pub hoist_props: bool,
pub hoist_vars: bool,
pub ie8: bool,
pub if_return: bool,
pub inline: u8,
pub join_vars: bool,
pub keep_classnames: bool,
pub keep_fargs: bool,
pub keep_fnames: bool,
pub keep_infinity: bool,
pub loops: bool,
pub module: bool,
pub negate_iife: bool,
pub passes: usize,
pub props: bool,
pub pure_getters: PureGetterOption,
pub reduce_fns: bool,
pub reduce_vars: bool,
pub sequences: u8,
pub side_effects: bool,
pub switches: bool,
pub top_retain: Vec<JsWord>,
pub top_level: Option<TopLevelOptions>,
pub typeofs: bool,
pub unsafe_passes: bool,
pub unsafe_arrows: bool,
pub unsafe_comps: bool,
pub unsafe_function: bool,
pub unsafe_math: bool,
pub unsafe_symbols: bool,
pub unsafe_methods: bool,
pub unsafe_proto: bool,
pub unsafe_regexp: bool,
pub unsafe_undefined: bool,
pub unused: bool,
}
Expand description
https://terser.org/docs/api-reference.html#compress-options
Fields
arguments: bool
arrows: bool
bools: bool
bools_as_ints: bool
collapse_vars: bool
comparisons: bool
computed_props: bool
conditionals: bool
dead_code: bool
directives: bool
drop_console: bool
drop_debugger: bool
ecma: EsVersion
evaluate: bool
expr: bool
Should we simplify expressions?
global_defs: AHashMap<Box<Expr>, Box<Expr>>
All expressions should have dummy span. Use swc_ecma_utils::drop_span to remove spans.
hoist_fns: bool
hoist_props: bool
hoist_vars: bool
ie8: bool
No effect.
if_return: bool
inline: u8
0
: disabled inlining1
: inline simple functions2
: inline functions with arguments3
: inline functions with arguments and variables
join_vars: bool
keep_classnames: bool
keep_fargs: bool
keep_fnames: bool
keep_infinity: bool
loops: bool
module: bool
negate_iife: bool
passes: usize
If this value is zero, the minifier will repeat work until the ast node is settled.
props: bool
pure_getters: PureGetterOption
reduce_fns: bool
reduce_vars: bool
sequences: u8
side_effects: bool
switches: bool
top_retain: Vec<JsWord>
Top level symbols to retain.
top_level: Option<TopLevelOptions>
typeofs: bool
unsafe_passes: bool
unsafe_arrows: bool
unsafe_comps: bool
unsafe_function: bool
unsafe_math: bool
unsafe_symbols: bool
unsafe_methods: bool
unsafe_proto: bool
unsafe_regexp: bool
unsafe_undefined: bool
unused: bool
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for CompressOptions
impl Send for CompressOptions
impl Sync for CompressOptions
impl Unpin for CompressOptions
impl UnwindSafe for CompressOptions
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more