Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/LuaTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3815,9 +3815,8 @@ export class LuaTransformer {
const absoluteImportPath = this.formatPathToLuaPath(this.getAbsoluteImportPath(relativePath));
const absoluteRootDirPath = this.formatPathToLuaPath(rootDir);
if (absoluteImportPath.includes(absoluteRootDirPath)) {
const relativePathToRoot = this.formatPathToLuaPath(
absoluteImportPath.replace(absoluteRootDirPath, "").slice(1));
return this.formatPathToLuaPath(relativePathToRoot);
const relativePathToRoot = absoluteImportPath.replace(absoluteRootDirPath, "").slice(1);
return relativePathToRoot;
} else {
throw TSTLErrors.UnresolvableRequirePath(undefined,
`Cannot create require path. Module does not exist within --rootDir`,
Expand Down