mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 03:01:48 +03:00
fix(swc): Respect jsc.experimental.keepImportAssertions
(#3352)
swc: - Fix `Merge` impl of `JscExperimental`.
This commit is contained in:
parent
b7c2e13237
commit
d9dc2b99dd
@ -985,8 +985,13 @@ pub struct JscExperimental {
|
|||||||
impl Merge for JscExperimental {
|
impl Merge for JscExperimental {
|
||||||
fn merge(&mut self, from: &Self) {
|
fn merge(&mut self, from: &Self) {
|
||||||
if self.plugins.is_none() {
|
if self.plugins.is_none() {
|
||||||
*self = from.clone();
|
self.plugins = from.plugins.clone();
|
||||||
}
|
}
|
||||||
|
if self.cache_root.is_none() {
|
||||||
|
self.cache_root = from.cache_root.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
self.keep_import_assertions |= from.keep_import_assertions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user