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

document typescript module resolution #583

Merged
merged 7 commits into from
Apr 11, 2024
Merged

Conversation

ephys
Copy link
Member

@ephys ephys commented Sep 15, 2023

This PR adds a note in our getting started guide indicating how to configure TypeScript correctly:

image

@github-actions
Copy link

@ephys
Copy link
Member Author

ephys commented Sep 15, 2023

Is this enough for #552 or should I add something somewhere else?

@WikiRik
Copy link
Member

WikiRik commented Sep 15, 2023

Possibly in pages like https://6504545ac3c0d91d6d9cb066--sequelize-site.netlify.app/docs/v7/models/defining-models/ where we have an info box about the usage of decorators? By referring in that box to the section in getting started?

@EinfachHans
Copy link

Setting resolvePackageJsonExports to true doesn't work for me. I had to set the moduleResolution (and module with it)

@ephys ephys requested a review from a team as a code owner April 11, 2024 20:16
@ephys ephys requested a review from WikiRik April 11, 2024 20:16
Copy link

@ephys
Copy link
Member Author

ephys commented Apr 11, 2024

@WikiRik does this change cover it?

Setting resolvePackageJsonExports to true doesn't work for me. I had to set the moduleResolution (and module with it)

Thanks for letting us know

I don't know if there is some interaction between a few different options that make this option incompatible but I think listing both options so people can see which one works for them is the way to go

docs/getting-started.mdx Outdated Show resolved Hide resolved
Copy link

@ephys ephys requested a review from WikiRik April 11, 2024 20:47
@ephys ephys enabled auto-merge (squash) April 11, 2024 20:50
Copy link

@ephys ephys merged commit 341ea81 into main Apr 11, 2024
5 checks passed
@ephys ephys deleted the ephys/document-typescript-setup branch April 11, 2024 20:56
@QuentinFarizon
Copy link

I don't think there really are 2 options, setting resolvePackageJsonExports yields :

error TS5098: Option 'resolvePackageJsonExports' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'.

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.

4 participants