Skip to content

Missing type exports #523

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

Closed
Yizack opened this issue Mar 29, 2025 · 1 comment · Fixed by #527 or #536
Closed

Missing type exports #523

Yizack opened this issue Mar 29, 2025 · 1 comment · Fixed by #527 or #536
Labels
bug Something isn't working upstream

Comments

@Yizack
Copy link
Contributor

Yizack commented Mar 29, 2025

Describe the bug
Hello since version 0.8.22 the package is missing all type exports. I think it has to be a change made within @nuxt/module-builder or @nuxt/kit but I wanted to report it here.

Types are not being rendered and exported from dist/types.d.ts, only default is exported

See the difference:
npm: v0.8.22
npm: v0.8.21

I noticed adding

"exports": {
  ".": {
    "types": "./dist/module.d.ts",
    "import": "./dist/module.mjs",
    "require": "./dist/module.cjs"
  }
}

Especially the "types": "./dist/module.d.ts" part solves it but I don't know if this is the right thing to do.
Reference from: nuxt/ui/package.json

Steps to reproduce
Steps to reproduce the behavior:

  1. Go to https://stackblitz.com/edit/nuxt-starter-hnnmurjf?file=app.vue
  2. Wait for install and type check commands to run
  3. See error

Expected behavior
Prior 0.8.22 type exports used to work and could use them through my nuxt app

Possibly related

@Yizack Yizack added the bug Something isn't working label Mar 29, 2025
@Yizack
Copy link
Contributor Author

Yizack commented Apr 1, 2025

Hi! @atinux #527 didn't fix the issue, as I mentioned, the problem is that weirdly ./dist/types.d.ts does not contain the type exports anymore but ./dist/module.d.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
2 participants