Comments (4)
I assume that you are asking for a way to get esbuild to unwrap the if
statement without inserting the comma operator. Enabling and disabling individual minification transforms like that not something that esbuild can do. There are only three separate flags for minification, which are already documented here: https://esbuild.github.io/api/#minify.
from esbuild.
I mean, can esbuild remove dead code (if loop with false statement) but don't minify script?
from esbuild.
Not in this case. Without minification enabled, esbuild still does some expression-level simplifications but doesn't do statement-level simplifications. Here are two ways to do that without minification enabled: option 1 and option 2.
from esbuild.
Thanks!
from esbuild.
Related Issues (20)
- esbuild tried to read "../../.." , in vite , using npm run dev HOT 1
- Destructuring bug in Safari when renamed parameter property is identical to the function name
- Class binding references in static field initializers should be resolved to the decorated class HOT 3
- `browsers` field not taken into account when using `exports`. HOT 1
- esbuild doesn't respect noImplicitUseStrict option in tsconfig.json HOT 1
- On-resolve result suffix property also requires path property?
- Substituting multi-use constants results in a larger bundle HOT 5
- Importing with a type attribute of "css" is not supported HOT 7
- Feature Request: Add polyfill for CSS `light-dark()`
- panic: Internal error: failed to parse runtime with `--supported:object-accessors=false` HOT 1
- [Bug?] Esbuild slow performance due to discarding dir cache when the plugin calls the built-in resolver
- Getting weird esbuild version when using 0.20.2 HOT 3
- ESbuild loader Plugin: Dynamic Imports do not contain "with" information HOT 3
- Dynamic imports with string literal templates are not resolved when using tsconfig paths
- Could not resolve "path", could not resolve "os" HOT 3
- Post install script fails with Expected "0.21.5" but got "0.21.4" HOT 2
- Disable resolving url() in stylesheets? HOT 3
- Request to update Go dependency to fix security vulnerabilities
- How to work with core-js ? HOT 5
- Is there a way to preserve string delimiters? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esbuild.