Skip to content

Conversation

@danielroe
Copy link
Member

resolves nuxt/module-builder#308

with directory indices, currently we output a JS file like this:

export * from "./star/index.mjs";

and a declaration like this:

export * from "./star.mjs";

This PR normalises the DTS generation so both have /index appended.

@danielroe danielroe self-assigned this Sep 10, 2024
@danielroe danielroe added the bug Something isn't working label Sep 10, 2024
@danielroe danielroe merged commit ad2d529 into main Sep 10, 2024
@danielroe danielroe deleted the fix/dts-index branch September 10, 2024 15:21
try {
isDir = statSync(
resolve(filename, "..", spec.specifier),
).isDirectory();
Copy link
Member

@pi0 pi0 Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a chance that both entry.ts and entry/ exists (in this case, we should pick entry.ts. Have you tested it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type generation is broken for subfolders (subfolder is imported with .js extension)

3 participants