module-builder icon indicating copy to clipboard operation
module-builder copied to clipboard

chore: exports condition add `types`

Open Gehbt opened this issue 1 year ago • 2 comments

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

Gehbt avatar May 09 '24 13:05 Gehbt

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?

danielroe avatar May 09 '24 17:05 danielroe

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.

Gehbt avatar May 10 '24 04:05 Gehbt