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

wrong package exports #3112

Open
userquin opened this issue Jan 16, 2025 · 4 comments
Open

wrong package exports #3112

userquin opened this issue Jan 16, 2025 · 4 comments
Labels
bug Something isn't working triage v3 #1289

Comments

@userquin
Copy link
Member

userquin commented Jan 16, 2025

Environment

NA

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.0-alpha

Reproduction

NA: check the package.json file

Description

The package exports using .d.ts instead d.mts. #imports should also be reviewed, for example we should add #build/ui.

For reference:

/cc @danielroe

Additional context

No response

Logs

@userquin userquin added bug Something isn't working triage v3 #1289 labels Jan 16, 2025
@benjamincanac
Copy link
Member

What issue do you encounter exactly? The exports to .d.mts will be used once we migrate to new major of @nuxt/module-builder.

@danielroe
Copy link
Member

@benjamincanac you can already adopt them before the module builder upgrade, if you want

Copy link
Member

What are the benefits? 🤔

@danielroe
Copy link
Member

danielroe commented Jan 16, 2025

It's more correct. If it's well set up, it means the types users can see in their projects is consistent across node10/node16 module resolutions modes + ESM/CJS.

You can see the results here: https://arethetypeswrong.github.io/?p=@nuxt/[email protected]

Nuxt modules don't need to be imported in CJS so that row is less important. Some of the other columns are failing due to imports (like #app) that can't be resolved, so the picture isn't as dire as it might seem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage v3 #1289
Projects
None yet
Development

No branches or pull requests

3 participants