Gathering detailed insights and metrics for babel-plugin-transform-rename-import
Gathering detailed insights and metrics for babel-plugin-transform-rename-import
Gathering detailed insights and metrics for babel-plugin-transform-rename-import
Gathering detailed insights and metrics for babel-plugin-transform-rename-import
npm install babel-plugin-transform-rename-import
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
44 Stars
61 Commits
6 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Jun 05, 2025
Latest Version
2.3.0
Package Id
babel-plugin-transform-rename-import@2.3.0
Size
2.49 kB
NPM Version
5.6.0
Node Version
9.11.1
Published on
Jul 01, 2018
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
replace import sources
$ npm install --save babel-plugin-transform-rename-import
1{ 2 "plugins": [["transform-rename-import", { original: 'assert', replacement: 'power-assert' }]] 3}
or multiple replacements:
1{ 2 "plugins": [ 3 ["transform-rename-import", { 4 replacements: [ 5 { original: 'replace-me', replacement: 'replaced' }, 6 { original: 'replace-me2', replacement: 'replaced2' } 7 ] 8 } 9 ]] 10}
RegExp:
1{ 2 "plugins": [["transform-rename-import", { original: '^(.+?)\\.less$', replacement: '$1.css' }]] 3}
1import plugin from 'babel-plugin-transform-rename-import' 2import { transform } from 'babel-core' 3 4function replace (code, original, replacement) { 5 return transform(code, { 6 babelrc: false, 7 plugins: [ 8 [plugin, { original, replacement} ], 9 ], 10 }).code; 11} 12 13replace("require('foo')", 'foo', 'bar') 14//=> "require('bar');" 15 16replace("import foo from 'foo'", 'foo', 'bar') 17//=> "import foo from 'bar';" 18 19replace("require('foo/thingy')", 'foo', 'bar') 20//=> "require('bar/thingy');" 21 22replace("require('foo/thingy.less')", '^(.+?)\\.less$', '$1.css') 23//=> "require('foo/thingy.css');"
MIT © Sigurd Fosseng
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/27 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More