Skip to content

Commit 552144e

Browse files
committed
fix buggy windows paths
1 parent e15482a commit 552144e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/importPaths.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function fixImportPaths(_a) {
1515
if (importPath.match(relativePathRegex)) {
1616
var newPath = path_1.join(dir, importPath.replace('BASE', ''));
1717
if (isWindows) {
18-
importPath = importPath.split('\\').join('\\\\');
18+
newPath = newPath.split('\\').join('\\\\');
1919
}
2020
var newLine = line.replace(importPath, newPath);
2121
if (!entries.has(newLine)) {

src/importPaths.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ export default function fixImportPaths({dir, content}): string {
3131

3232
// fix buggy Windows paths
3333
if (isWindows) {
34-
importPath = importPath.split('\\').join('\\\\');
34+
newPath = newPath.split('\\').join('\\\\');
3535
}
3636

37-
let newLine = line.replace(importPath, newPath);
37+
const newLine = line.replace(importPath, newPath);
3838
// add to map of entry files
3939
if (!entries.has(newLine)) {
4040
entries.add(newLine);

0 commit comments

Comments
 (0)