Skip to content

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

@mgol

Description

@mgol

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions