mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 22:56:11 +03:00
fix(es): Preserve license comments by default (#6703)
**Related issue:** - Closes https://github.com/swc-project/swc/issues/6677.
This commit is contained in:
parent
70d8ecc37c
commit
58700f2bec
@ -943,7 +943,7 @@ pub struct JsMinifyFormatOptions {
|
||||
#[serde(default)]
|
||||
pub braces: bool,
|
||||
|
||||
#[serde(default)]
|
||||
#[serde(default = "default_comments")]
|
||||
pub comments: BoolOrDataConfig<JsMinifyCommentOption>,
|
||||
|
||||
/// Not implemented yet.
|
||||
@ -1015,6 +1015,10 @@ pub struct JsMinifyFormatOptions {
|
||||
pub wrap_func_args: bool,
|
||||
}
|
||||
|
||||
fn default_comments() -> BoolOrDataConfig<JsMinifyCommentOption> {
|
||||
BoolOrDataConfig::from_obj(JsMinifyCommentOption::PreserveSomeComments)
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub enum JsMinifyCommentOption {
|
||||
#[serde(rename = "some")]
|
||||
|
Loading…
Reference in New Issue
Block a user