Skip to content

Conversation

xawill
Copy link
Contributor

@xawill xawill commented Aug 12, 2025

Proposal fix for #1266, as discussed

package.json Outdated
"./src/*": "./src/*"
".": {
"import": "./build/index.js",
"types": "./build/types/index.d.ts"
Copy link
Contributor

Choose a reason for hiding this comment

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

Amazing, thanks! Can you explain why all the d.ts files need to be copied to the /build folder rather than be directly referenced in the /src folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They don't. Both ways work; just a "design" choice. It was my initial proposal in the issue to keep consistency with your build folder approach to have there all the files exported by the library. This includes the types IMO. But you could also reference the files in the src folder and remove the copying step in the vite config file. Your choice :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the clarification! I think I'd like to err on the side of less code and keep the builds more simple where possible so I've just pushed the changes to reference the types directly in the /src folder. If this looks good to you then we can merge it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A bit more difficult to say with the last merge commit, but yes, LGTM. Thanks!

@gkjohnson gkjohnson merged commit 84e28e5 into NASA-AMMOS:master Aug 14, 2025
1 check passed
@xawill xawill deleted the fix/build-step-types branch August 15, 2025 01:18
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