babel-plugin-assets-named-imports
Advanced tools
Comparing version 0.1.0 to 0.2.0
20
index.js
const { extname } = require('path') | ||
/** | ||
* | ||
* @param {Object} babel | ||
@@ -59,3 +58,7 @@ * @param {import('@babel/types')} babel.types | ||
const newSourcePath = generateNewSourcePath(loaderMap, specifier.local.name, sourcePath) | ||
const newSourcePath = generateNewSourcePath( | ||
loaderMap, | ||
specifier.local.name, | ||
sourcePath | ||
) | ||
@@ -78,5 +81,3 @@ if (newSourcePath === sourcePath) { | ||
], | ||
t.stringLiteral( | ||
newSourcePath | ||
) | ||
t.stringLiteral(newSourcePath) | ||
) | ||
@@ -100,6 +101,3 @@ }) | ||
if (newSoucePath === sourcePath) { | ||
return t.importDeclaration( | ||
[specifier], | ||
t.stringLiteral(sourcePath) | ||
) | ||
return t.importDeclaration([specifier], t.stringLiteral(sourcePath)) | ||
} | ||
@@ -109,5 +107,3 @@ | ||
[t.importDefaultSpecifier(t.identifier(specifier.local.name))], | ||
t.stringLiteral( | ||
newSoucePath | ||
) | ||
t.stringLiteral(newSoucePath) | ||
) | ||
@@ -114,0 +110,0 @@ }) |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"main": "index.js", | ||
@@ -18,4 +18,6 @@ "files": [ | ||
"devDependencies": { | ||
"@babel/core": "^7.2.2", | ||
"jest": "^23.6.0" | ||
} | ||
}, | ||
"gitHead": "7f96e8d8fa8b7489b7cf52ac4f57616bfbed27a5" | ||
} |
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
4806
4
2
98