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

babel-plugin-import

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-import - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

21

lib/Plugin.js

@@ -124,15 +124,12 @@ 'use strict';

}
} else {
// React.createElement(Button) -> React.createElement(_Button)
// if (object && object.name === 'React' && property && property.name === 'createElement' && node.arguments) {
node.arguments = node.arguments.map(function (arg) {
var argName = arg.name;
}
if (_this3.specified[argName] && path.scope.hasBinding(argName) && path.scope.getBinding(argName).path.type === 'ImportSpecifier') {
return _this3.importMethod(_this3.specified[argName], file, opts);
}
return arg;
});
// }
}
node.arguments = node.arguments.map(function (arg) {
var argName = arg.name;
if (_this3.specified[argName] && path.scope.hasBinding(argName) && path.scope.getBinding(argName).path.type === 'ImportSpecifier') {
return _this3.importMethod(_this3.specified[argName], file, opts);
}
return arg;
});
}

@@ -139,0 +136,0 @@ }, {

{
"name": "babel-plugin-import",
"version": "1.1.0",
"version": "1.1.1",
"description": "Component modular import plugin for babel.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -10,2 +10,7 @@ # babel-plugin-import

## Why babel-plugin-import
- [English Instruction](https://ant.design/docs/react/getting-started#Import-on-Demand)
- [中文说明](https://ant.design/docs/react/getting-started-cn#%E6%8C%89%E9%9C%80%E5%8A%A0%E8%BD%BD)
## Example

@@ -86,5 +91,5 @@

- `["import", [{ "libraryName": "antd" }]]`: import js modularly
- `["import", [{ "libraryName": "antd", "style": true }]]`: import js and css modularly (less source files)
- `["import", [{ "libraryName": "antd", "style": "css" }]]`: import js and css modularly (css built files)
- `["import", { "libraryName": "antd" }]`: import js modularly
- `["import", { "libraryName": "antd", "style": true }]`: import js and css modularly (less source files)
- `["import", { "libraryName": "antd", "style": "css" }]`: import js and css modularly (css built files)

@@ -91,0 +96,0 @@ ### Note

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