mirror of
https://github.com/swc-project/swc.git
synced 2024-11-23 17:54:15 +03:00
fix(es): Merge jsc.loose
and jsc.assumptions
(#3990)
This commit is contained in:
parent
2a6106f0b7
commit
3590ea2277
@ -1572,10 +1572,12 @@ impl Merge for swc_ecma_preset_env::Config {
|
|||||||
|
|
||||||
impl Merge for JscConfig {
|
impl Merge for JscConfig {
|
||||||
fn merge(&mut self, from: &Self) {
|
fn merge(&mut self, from: &Self) {
|
||||||
|
self.assumptions.merge(&from.assumptions);
|
||||||
self.syntax.merge(&from.syntax);
|
self.syntax.merge(&from.syntax);
|
||||||
self.transform.merge(&from.transform);
|
self.transform.merge(&from.transform);
|
||||||
self.target.merge(&from.target);
|
|
||||||
self.external_helpers.merge(&from.external_helpers);
|
self.external_helpers.merge(&from.external_helpers);
|
||||||
|
self.target.merge(&from.target);
|
||||||
|
self.loose.merge(&from.loose);
|
||||||
self.keep_class_names.merge(&from.keep_class_names);
|
self.keep_class_names.merge(&from.keep_class_names);
|
||||||
self.paths.merge(&from.paths);
|
self.paths.merge(&from.paths);
|
||||||
self.minify.merge(&from.minify);
|
self.minify.merge(&from.minify);
|
||||||
@ -1673,6 +1675,34 @@ impl Merge for swc_ecma_parser::TsConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Merge for Assumptions {
|
||||||
|
fn merge(&mut self, from: &Self) {
|
||||||
|
self.array_like_is_iterable |= from.array_like_is_iterable;
|
||||||
|
self.constant_reexports |= from.constant_reexports;
|
||||||
|
self.constant_super |= from.constant_super;
|
||||||
|
self.enumerable_module_meta |= from.enumerable_module_meta;
|
||||||
|
self.ignore_function_length |= from.ignore_function_length;
|
||||||
|
self.ignore_function_name |= from.ignore_function_name;
|
||||||
|
self.ignore_to_primitive_hint |= from.ignore_to_primitive_hint;
|
||||||
|
self.iterable_is_array |= from.iterable_is_array;
|
||||||
|
self.mutable_template_object |= from.mutable_template_object;
|
||||||
|
self.no_class_calls |= from.no_class_calls;
|
||||||
|
self.no_document_all |= from.no_document_all;
|
||||||
|
self.no_incomplete_ns_import_detection |= from.no_incomplete_ns_import_detection;
|
||||||
|
self.no_new_arrows |= from.no_new_arrows;
|
||||||
|
self.object_rest_no_symbols |= from.object_rest_no_symbols;
|
||||||
|
self.private_fields_as_properties |= from.private_fields_as_properties;
|
||||||
|
self.pure_getters |= from.pure_getters;
|
||||||
|
self.set_class_methods |= from.set_class_methods;
|
||||||
|
self.set_computed_properties |= from.set_computed_properties;
|
||||||
|
self.set_public_class_fields |= from.set_public_class_fields;
|
||||||
|
self.set_spread_properties |= from.set_spread_properties;
|
||||||
|
self.skip_for_of_iterator_closing |= from.skip_for_of_iterator_closing;
|
||||||
|
self.super_is_callable_constructor |= from.super_is_callable_constructor;
|
||||||
|
self.ts_enum_is_readonly |= from.ts_enum_is_readonly;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Merge for TransformConfig {
|
impl Merge for TransformConfig {
|
||||||
fn merge(&mut self, from: &Self) {
|
fn merge(&mut self, from: &Self) {
|
||||||
self.optimizer.merge(&from.optimizer);
|
self.optimizer.merge(&from.optimizer);
|
||||||
|
Loading…
Reference in New Issue
Block a user