@unikue/babel-plugin-remove-comment
v1.0.0
Published
Removes script comments during babel compilation
Maintainers
Readme
@unikue/babel-plugin-remove-comment
🏅 Removes script comments during babel compilation 👍
Features
✅ Support removing comments by option
Quickstart
You can install this package in your typescript project as follows:
$ npm install @unikue/babel-plugin-remove-comment --save-devEnjoy your coding journey with babel-plugin-remove-comment ✌️
Usage
- Using in javascript/typescript
const plugin = require('@unikue/babel-plugin-remove-comment');
babel.transform(source_code, {
plugins: [
[plugin, {scope: 'all'}]
]
});- Using in
babel.config.jsonor.babelrc.jsonof babel
{
"plugin": [
["@unikue/babel-plugin-remove-comment", {
"scope": "all"
}]
]
}- Using in
.fatherrc.tsof father
{
extraBabelPlugins: [
['@unikue/babel-plugin-remove-comment', {
scope: 'all'
}]
]
}Option
Here is the available option:
| Param Name | Param Value | Value Type |
|------------|--------------------------------|------------|
| scope | all, block, line, none | string |
Document
- GitHub pages: https://unikueltd.github.io/babel-plugin-remove-comment
References
License
This project is under the MIT License.
Website
- Unikue: https://unikue.cn
