nuxt / module-builder

Complete solution to build and ship Nuxt modules.
MIT License
211 stars 22 forks source link

chore: exports condition add `types` #265

Closed Gehbt closed 1 month ago

Gehbt commented 1 month ago

Config "modeResolution": "bundler" will read exports condiction types to get type

danielroe commented 1 month ago

If it is omitted, it will look for ./dist/module.d.mts for import and, ./dist/module.d.cts for require.

Are you opening this PR because you are encountering an issue?

Gehbt commented 1 month ago

The first problem I find is from nuxt-monaco-editor, and I search the solve at nuxt/sitemap or nuxt-modules/tailwindcss with issue

Sometime, the module haven't module.d.mts or module.d.cts but typically includes types.d.ts. if someone want register config to @nuxt/schema, he should set this. If it is as a convention.