Skip to content

fix: sync minify file comments from SWC#8628

Merged
fi3ework merged 1 commit intomainfrom
rslib-418
Dec 5, 2024
Merged

fix: sync minify file comments from SWC#8628
fi3ework merged 1 commit intomainfrom
rslib-418

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Dec 5, 2024

Summary

Fix web-infra-dev/rslib#418.

The behavior of the new minify_file_comments function in swc_loader remains consistent with the current implementation:

  1. preserveAllComments: true
  2. preserveAllComments: false:
    1. minify.format.comments: "all": true
    2. minify.format.comments: "some": false
    3. minify.format.comments: false: false

In the future, you can directly use preserve_annotations here.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@fi3ework fi3ework marked this pull request as draft December 5, 2024 03:10
@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Dec 5, 2024
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Dec 5, 2024
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 5, 2024

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit 8e3fd83
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/67513e24a3070100070beb3b
😎 Deploy Preview https://deploy-preview-8628--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fi3ework fi3ework marked this pull request as ready for review December 5, 2024 07:03
@fi3ework fi3ework enabled auto-merge (squash) December 5, 2024 08:03
@fi3ework fi3ework merged commit 8b0f43f into main Dec 5, 2024
@fi3ework fi3ework deleted the rslib-418 branch December 5, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: the minify options comments: "some" does not preserve pure annotation

2 participants