@achicu/babel-plugin-dead-code-elimination 中文文档教程
babel-plugin-dead-code-elimination
消除死代码
Installation
$ npm install babel-plugin-dead-code-elimination
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["dead-code-elimination"]
}
Via CLI
$ babel --plugins dead-code-elimination script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["dead-code-elimination"]
});
babel-plugin-dead-code-elimination
Eliminate dead code
Installation
$ npm install babel-plugin-dead-code-elimination
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["dead-code-elimination"]
}
Via CLI
$ babel --plugins dead-code-elimination script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["dead-code-elimination"]
});