diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts
index a634ac334a0..f6e192dc4b9 100644
--- a/src/services/codefixes/importFixes.ts
+++ b/src/services/codefixes/importFixes.ts
@@ -97,7 +97,6 @@ import {
mapDefined,
memoizeOne,
ModuleKind,
- ModuleResolutionKind,
moduleResolutionUsesNodeModules,
moduleSpecifiers,
MultiMap,
@@ -1054,13 +1053,11 @@ function compareModuleSpecifiers(
// This is a simple heuristic to try to avoid creating an import cycle with a barrel re-export.
// E.g., do not `import { Foo } from ".."` when you could `import { Foo } from "../Foo"`.
// This can produce false positives or negatives if re-exports cross into sibling directories
-// (e.g. `export * from "../whatever"`) or are not named "index" (we don't even try to consider
-// this if we're in a resolution mode where you can't drop trailing "/index" from paths).
+// (e.g. `export * from "../whatever"`) or are not named "index".
function isFixPossiblyReExportingImportingFile(fix: ImportFixWithModuleSpecifier, importingFile: SourceFile, compilerOptions: CompilerOptions, toPath: (fileName: string) => Path): boolean {
if (
fix.isReExport &&
fix.exportInfo?.moduleFileName &&
- getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node10 &&
isIndexFileName(fix.exportInfo.moduleFileName)
) {
const reExportDir = toPath(getDirectoryPath(fix.exportInfo.moduleFileName));
diff --git a/tests/cases/fourslash/importNameCodeFix_barrelExport4.ts b/tests/cases/fourslash/importNameCodeFix_barrelExport4.ts
new file mode 100644
index 00000000000..493a8ae7718
--- /dev/null
+++ b/tests/cases/fourslash/importNameCodeFix_barrelExport4.ts
@@ -0,0 +1,30 @@
+///
+
+// @module: preserve
+// @moduleResolution: bundler
+
+// @Filename: /foo/a.ts
+//// export const A = 0;
+
+// @Filename: /foo/b.ts
+//// export {};
+//// A/*sibling*/
+
+// @Filename: /foo/index.ts
+//// export * from "./a";
+//// export * from "./b";
+
+// @Filename: /index.ts
+//// export * from "./foo";
+//// export * from "./src";
+
+// @Filename: /src/a.ts
+//// export {};
+//// A/*parent*/
+
+// @Filename: /src/index.ts
+//// export * from "./a";
+
+// Module specifiers made up of only "." and ".." components are deprioritized
+verify.importFixModuleSpecifiers("sibling", ["./a", ".", ".."]);
+verify.importFixModuleSpecifiers("parent", ["../foo", "../foo/a", ".."]);
\ No newline at end of file
diff --git a/tests/cases/fourslash/importNameCodeFix_barrelExport5.ts b/tests/cases/fourslash/importNameCodeFix_barrelExport5.ts
new file mode 100644
index 00000000000..465f96c8b9f
--- /dev/null
+++ b/tests/cases/fourslash/importNameCodeFix_barrelExport5.ts
@@ -0,0 +1,31 @@
+///
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// { "type": "module" }
+
+// @Filename: /foo/a.ts
+//// export const A = 0;
+
+// @Filename: /foo/b.ts
+//// export {};
+//// A/*sibling*/
+
+// @Filename: /foo/index.ts
+//// export * from "./a.js";
+//// export * from "./b.js";
+
+// @Filename: /index.ts
+//// export * from "./foo/index.js";
+//// export * from "./src/index.js";
+
+// @Filename: /src/a.ts
+//// export {};
+//// A/*parent*/
+
+// @Filename: /src/index.ts
+//// export * from "./a.js";
+
+verify.importFixModuleSpecifiers("sibling", ["./a.js", "./index.js", "../index.js"]);
+verify.importFixModuleSpecifiers("parent", ["../foo/a.js", "../foo/index.js", "../index.js"]);
\ No newline at end of file