Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature Request: Fine-tuning Terser #6471

Open
@fxlrnrpt

Description

@fxlrnrpt

Is this a bug report?

No

Proposal:
Support a new environment variableTERSER_CONFIG. A dev could set it to a JSON withconfig values supported by Terser and CRA would merge default this JSON with its default Terser config.

Example:

  1. SetTERSER_CONFIG to{ "keep_classnames": true }
  2. keep_classnames set totrue added toTerser options

Reasoning:
Certain libraries rely on class names which are minified by default by Terser. It would be nice to change that without maintaining a fork of CRA for one line of code only.
I'm pretty sure there're other cases as well. Anyway it's pretty simple to add this, it would give developers more freedom, so what's the harm, right? :)

Implementation considerations:
IfTERSER_CONFIG environment variable is present, doJSON.parse of its value and add it to Terser optionshere. AddTERSER_CONFIG tothis list.

Would you be willing to accept a PR for this functionality?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp