babel-plugin-transform-remove-imports
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "babel-plugin-transform-remove-imports", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Remove the specified import declaration when you use the babel transform to build the package.", | ||
@@ -42,4 +42,4 @@ "repository": "https://github.com/jaywcjlove/babel-plugin-transform-remove-imports", | ||
}, | ||
"author": "", | ||
"author": "Kenny Wong", | ||
"license": "MIT" | ||
} |
@@ -48,2 +48,25 @@ babel-plugin-transform-remove-imports | ||
import { Select } from '@uiw/core'; | ||
``` | ||
``` | ||
## Programatic Usage | ||
```js | ||
import plugin from 'babel-plugin-transform-rename-import' | ||
import { transform } from 'babel-core' | ||
function replace (code) { | ||
return transform(code, { | ||
babelrc: false, | ||
plugins: [ | ||
[plugin, { test: "(less|css)$" }] | ||
], | ||
}).code; | ||
} | ||
replace("import './index.main.less';import { Button } from 'uiw';") | ||
//=> "import { Button } from 'uiw';" | ||
``` | ||
## License | ||
MIT © [`Kenny Wong`](https://github.com/jaywcjlove) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
1
71
1
3618
5
20