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

Feature request: --drop for labels #2398

Closed
pushkine opened this issue Jul 19, 2022 · 0 comments
Closed

Feature request: --drop for labels #2398

pushkine opened this issue Jul 19, 2022 · 0 comments

Comments

@pushkine
Copy link

Feature request:

Option to define ids of LabelStatements to be stripped from the output

e.g. --droplabel:__DEV__

I find labels to be a better solution over build-time variable injection
Rollup has a plugin called "@rollup/plugin-strip" for this purpose:

plugins: [
    // strips all `__DEV__: ...` labels
    strip({ labels: ["__DEV__"], include: "**/*.ts" }),
]

Might be a niche request but this is actually the only rollup feature I ever use beside transpilers, I'd love to have that option on esbuild

@evanw evanw closed this as completed in 9b83e55 Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant