Skip to content

Commit dc8fb7f

Browse files
committed
No need for preserveImports option in transformStyleAttribute
1 parent a82381f commit dc8fb7f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

node/src/lib.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ struct AttrConfig {
743743
pub targets: Option<Browsers>,
744744
#[serde(default)]
745745
pub minify: bool,
746-
pub analyze_dependencies: Option<AnalyzeDependenciesOption>,
746+
pub analyze_dependencies: bool,
747747
#[serde(default)]
748748
pub error_recovery: bool,
749749
}
@@ -799,14 +799,8 @@ fn compile_attr<'i>(
799799
minify: config.minify,
800800
source_map: None,
801801
targets: config.targets,
802-
analyze_dependencies: if let Some(d) = &config.analyze_dependencies {
803-
match d {
804-
AnalyzeDependenciesOption::Bool(b) if *b => Some(DependencyOptions { remove_imports: true }),
805-
AnalyzeDependenciesOption::Config(c) => Some(DependencyOptions {
806-
remove_imports: !c.preserve_imports,
807-
}),
808-
_ => None,
809-
}
802+
analyze_dependencies: if config.analyze_dependencies {
803+
Some(DependencyOptions::default())
810804
} else {
811805
None
812806
},

0 commit comments

Comments
 (0)