tsunami icon indicating copy to clipboard operation
tsunami copied to clipboard

Remove trailing /index from imports in moduleResolution: node

Open crazytoucan opened this issue 8 years ago • 0 comments

In my project, I have folders which have an index.ts which re-export all "public" symbols from that folder. I want my imports to come from that folder when applicable:

// module/index.ts
export interface Foo {
  bar: string;
}

// other/file.ts
// current import emit:
import { Foo } from "../module/index";
// expected import emit:
import { Foo } from "../module";

crazytoucan avatar Nov 12 '16 04:11 crazytoucan