Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the format preamble format option in swc.minify #7475

Closed
mgol opened this issue May 31, 2023 · 3 comments · Fixed by #7551
Closed

Support the format preamble format option in swc.minify #7475

mgol opened this issue May 31, 2023 · 3 comments · Fixed by #7551
Assignees
Milestone

Comments

@mgol
Copy link

mgol commented May 31, 2023

Describe the feature

See https://swc.rs/docs/configuration/minification#jscminifyformat

preamble, Currently noop

It should be possible to pass preamble. SWC should be able to insert it to the minified file without breaking source map associations.

Babel plugin or link to the feature description

No response

Additional context

FWIW, jQuery is currently switching from UglifyJS to Terser in jquery/jquery#5258. We considered switching to SWC instead as it's way faster and optimizes better than Terser but the lack of the preamble option is a blocker for us at the moment.

@kdy1 kdy1 self-assigned this Jun 1, 2023
@kdy1 kdy1 added this to the Planned milestone Jun 1, 2023
@limerickgds
Copy link
Contributor

@kdy1 Is this already in progress? If it's not urgent, maybe I can submit a PR next week?

@kdy1
Copy link
Member

kdy1 commented Jun 10, 2023

Not yet, and it would be so great. Thank you in advance!

@swc-bot
Copy link
Collaborator

swc-bot commented Jul 20, 2023

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Jul 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

4 participants