@talend/babel-plugin-import-from-index
Advanced tools
Comparing version 1.4.2 to 1.4.3
{ | ||
"name": "@talend/babel-plugin-import-from-index", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "Transform default imports from specific path to named import from index", | ||
@@ -41,2 +41,2 @@ "main": "src/index.js", | ||
} | ||
} | ||
} |
@@ -105,3 +105,8 @@ const PACKAGES = [ | ||
} else if (lastName && lastName !== localName) { | ||
importedName = lastName; | ||
// fix default import name except if we are at the root of the package | ||
if (PACKAGES.indexOf(importDeclarationPath.node.source.value) === -1) { | ||
importedName = lastName; | ||
} else { | ||
return types.importDefaultSpecifier(types.identifier(localName)); | ||
} | ||
} | ||
@@ -108,0 +113,0 @@ return types.importSpecifier( |
@@ -89,3 +89,7 @@ import pluginTester from 'babel-plugin-tester'; | ||
}, | ||
{ | ||
code: "import cmfContainer, { AppLoader } from '@talend/react-containers';", | ||
output: "import cmfContainer, { AppLoader } from '@talend/react-containers';", | ||
}, | ||
], | ||
}); |
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
9501
235