babel-plugin-minify-dead-code-elimination `SequenceExpression` use case
See original GitHub issueSequenceExpression
in ExpressionStatement
containing UnaryExpression(void 0)
does not remove dead code.
I realize this is a small use case, but if an ExpressionStatement
contains a SequenceExpression
with void 0 it can be removed with no worry of side-effects.
a, b, c, d, void 0;
should be:
a, b, c, d;
Thanks for reading!
-Josh
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
babel-plugin-minify-dead-code-elimination
Example. In function foo() {var x = 1;} function bar() { var x = f(); } function baz() { var x = 1;...
Read more >babel-plugin-minify-dead-code-elimination - npm
Inlines bindings when possible. Tries to evaluate expressions and prunes unreachable as a result.. Latest version: 0.5.2, last published: 8 ...
Read more >package-lock.json - plugins/code-coverage - Git at Google
"resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.5.0.tgz",.
Read more >Third Party Software 5.2.1 - Confluent
Confluent is building the foundational platform for data in motion so any organization can innovate and win in a digital-first world.
Read more >@emotion/babel-plugin | Yarn - Package Manager
Uglifyjs will use the injected /*#__PURE__*/ flag comments to mark your css and styled blocks as candidates for dead code elimination. Source Maps,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s an unsafe transformation -
This is similar to https://github.com/babel/babili/pull/197 where we remove
undefined
only when it’s in a “safe” context.