Comparing version 1.3.5 to 1.3.6
@@ -75,5 +75,2 @@ "use strict"; | ||
let prefix = alias.replace(/\*$/, ''); | ||
if (prefix[prefix.length - 1] === '/') { | ||
prefix = prefix.substring(0, prefix.length - 1); | ||
} | ||
return { | ||
@@ -116,7 +113,4 @@ prefix, | ||
assert(typeof requiredModule == 'string', `Unexpected import statement pattern ${orig}`); | ||
const index = orig.indexOf(alias.prefix); | ||
const isAlias = requiredModule.includes('/') | ||
? requiredModule.startsWith(alias.prefix + '/') | ||
: requiredModule.startsWith(alias.prefix); | ||
if (index > -1 && isAlias) { | ||
const isAlias = requiredModule.startsWith(alias.prefix); | ||
if (isAlias) { | ||
let absoluteAliasPath = helpers_1.getAbsoluteAliasPath(alias.basePath, alias.path); | ||
@@ -127,2 +121,3 @@ let relativeAliasPath = normalizePath(path_1.relative(path_1.dirname(file), absoluteAliasPath)); | ||
} | ||
const index = orig.indexOf(alias.prefix); | ||
const newImportScript = orig.substring(0, index) + | ||
@@ -129,0 +124,0 @@ relativeAliasPath + |
{ | ||
"name": "tsc-alias", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "Replace alias paths with relative paths after typescript compilation.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
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
55199
483