We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
index
1 parent eb4bf8b commit 59b0e96Copy full SHA for 59b0e96
src/core/utils.ts
@@ -57,7 +57,7 @@ export function resolveEntry(
57
}
58
59
function endsWithIndex(s: string) {
60
- return /(?:^|[/\\])index\..+$/.test(s)
+ return /(?:^|[/\\])index(?:\..+)?$/.test(s)
61
62
63
export function shouldAddIndex(id: string, resolved: string): boolean {
tests/__snapshots__/rollup/no-index.md
@@ -15,6 +15,7 @@ export type Bar = string;
15
```ts
16
export {} from './foo/index.js';
17
export {} from './index.js';
18
+export {} from './index.js';
19
20
```
21
## main.js
tests/fixtures/no-index/main.ts
@@ -1,2 +1,3 @@
1
export {} from './foo'
2
export {} from '.'
3
+export {} from './index'
0 commit comments