Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-remove-imports

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-remove-imports - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

4

package.json
{
"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)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc