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

Build separate declaration files #814

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

makuko
Copy link

@makuko makuko commented Jun 25, 2023

ES module and CommonJS module should each have their own declaration files to work properly in all contexts. You can read more about that here.

As mentioned in the linked issue when setting "moduleResolution": "NodeNext" typescript can't resolve Drizzle packages from CommonJS modules because there is no declaration file with a d.cts file extension.

The TypeScript docs also state:

It’s important to note that the CommonJS entrypoint and the ES module entrypoint each needs its own declaration file, even if the contents are the same between them.

I changed the build process to handle this. Please have a look and let me know what you think.

@dankochetov
Copy link
Contributor

Could you please clarify what is not working for you with the current setup?

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.

None yet

2 participants