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

[FR]: control minify behavior with a flag #197

Open
alexeagle opened this issue Mar 27, 2024 · 0 comments
Open

[FR]: control minify behavior with a flag #197

alexeagle opened this issue Mar 27, 2024 · 0 comments
Labels
enhancement New feature or request untriaged Requires traige

Comments

@alexeagle
Copy link
Member

What is the current behavior?

Developers need to minify for production, but minified code during development is just a nuisance. This is a common pattern in compilers which can produce "stripped" or "optimized" vs. "debug" binaries.

Currently the minify flag has to be a boolean in the BUILD file, so developers have to manually change it, or use a select to make it configurable based on some command-line flag.

Describe the feature

We should probably just honor the --compilation_mode flag, as many Bazel users have --compilation_mode=opt in their release configuration. For backwards compat, we could have trinary similar to stamping behavior:

  • minify = True is always minify
  • minify = False is never minify
  • minify = None is "honor the --compilation_mode"
@alexeagle alexeagle added the enhancement New feature or request label Mar 27, 2024
@github-actions github-actions bot added the untriaged Requires traige label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request untriaged Requires traige
Projects
Status: No status
Development

No branches or pull requests

1 participant