esbuild
esbuild copied to clipboard
Feature request: `--drop` for labels
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