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

fix: #63 #64

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix: #63 #64

wants to merge 2 commits into from

Conversation

NguyenDuck
Copy link

Correct type declaration in package.json

Copy link
Collaborator

@rlandav rlandav left a comment

Choose a reason for hiding this comment

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

Thanks! One piece of feedback.

@NguyenDuck NguyenDuck requested a review from rlandav March 25, 2025 13:43
@lucyydotp
Copy link
Member

Hi, hope you don't mind me chiming in here. We've just run into #63 at Noxcrew.

Unlike many teams, we don't bundle our scripts in most situations in order to preserve stack traces and keep output code readable and debuggable without needing to faff with source maps. This obviously means that we need to package dependencies ourselves, which we do by through a node_modules-style copy of every package in the scripts folder, and some generated shims to make exports work nicely.

Which brings me onto my question - would this make more sense as just a simple main and types combo? Using node's exports field feels counterintuitive to me, as it's not something that Minecraft itself supports, meaning that import resolution has to be done ahead-of-time by an external tool (i.e. a bundler, or in our case, a ts transformer plugin). Using exports makes that process considerably more complicated, especially so when a package has conditional exports like this one does, despite being ESM-only.

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.

3 participants