fix: include all source files for type declaration#117
Conversation
🦋 Changeset detectedLatest commit: 69f6aba The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
Related Documentation 1 document(s) may need updating based on files changed in this PR: Strapi development
|
boazpoolman
left a comment
There was a problem hiding this comment.
Hi @jhoward1994,
I've approved the PR because it solves #115 effectively.
However, there is a related types problem I see with custom exports. For example this Better Auth plugin. It has a custom export called 'adapter' which doesn't get any types in the build directory, even though they are specified in the exports object.
|
@boazpoolman thanks will look into that as a follow up |



What does it do?
Updates the
includeoption for thevite-plugin-dtsplugin to match all source files within the entry file's directory, usingpath.join(path.dirname(bundle.source), '**/*'). This expands type declaration generation from just the entry file to all files in the source folder.Why is it needed?
By including all source files, all relevant type declarations will be emitted.
How to test it
strapi-plugin build.disttypes directory includes declaration files for all referenced and imported types, not just for the entry point.Related issue(s) / PR(s)
#115