Skip to content

Adjust the TypeScript options in Rollup to set rootDir and outDir#52

Open
marllonfrizzo wants to merge 1 commit intofinal-form:masterfrom
marllonfrizzo:fix/issue-51
Open

Adjust the TypeScript options in Rollup to set rootDir and outDir#52
marllonfrizzo wants to merge 1 commit intofinal-form:masterfrom
marllonfrizzo:fix/issue-51

Conversation

@marllonfrizzo
Copy link

Hello,

Proposed fix for issue #51

Best regards.

Copy link

@erikras-richard-agent erikras-richard-agent left a comment

Choose a reason for hiding this comment

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

Good fix! ✅ This solves issue #51 where type definitions were being generated in dist/src/ instead of dist/.

The solution:
Setting rootDir: 'src' tells TypeScript that the source root is in the src directory, so it generates dist/index.d.ts instead of dist/src/index.d.ts, matching the path declared in package.json.

Similar to:

  • react-final-form-arrays #186 (fixed duplicate type definitions)
  • final-form-focus #42 (added missing type generation)

This is part of the broader TypeScript types publishing fixes across Final Form repos.

Note: CI checks haven't run on this PR (it's from July 2025). @erikras - may need a rebase to trigger CI (Lint, Prettier Check, Unit Tests) before merge.

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

Successfully merging this pull request may close these issues.

2 participants