Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@rollup/plugin-typescript doesn't provide explicit file extension when format: 'esm' is used #1801

Open
amannn opened this issue Oct 25, 2024 · 0 comments

Comments

@amannn
Copy link

amannn commented Oct 25, 2024

  • Rollup Plugin Name: @rollup/plugin-typescript
  • Rollup Plugin Version: 12.1.1
  • Rollup Version: 4.24.0
  • Operating System (or Browser): macOS
  • Node Version: 20
  • Link to reproduction: https://github.com/amannn/ts-esm-test

Expected Behavior

@rollup/plugin-typescript should honor format: 'esm' and produce declaration files with explicit file extensions:

// dist/index.d.ts
export * from './core.js';

Actual Behavior

@rollup/plugin-typescript does not provide an explicit file extension in declaration files:

// dist/index.d.ts
export * from './core';

Additional Information

Note that for the JS output, this works as expected:

// index.js
export { test } from './core.js';

Reproduction:

  1. Clone https://github.com/amannn/ts-esm-test/tree/main
  2. pnpm i
  3. pnpm build
  4. pnpm lint (fails, as expected)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant