Skip to content

fix: remove generic package export #1566

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Conversation

tobiasdiez
Copy link

I got the following error with nuxt:

[DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.mjs" for module request ".//index.mjs" matched to "./*" in the "exports" field module resolution of the package at D:\Programming\JabRefOnline\node_modules\@vue\apollo-composable\package.json

(I think this is windows specific)

This is fixed by removing the generic ./* export field.

I got the following error with nuxt:
```
[DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.mjs" for module request ".//index.mjs" matched to "./*" in the "exports" field module resolution of the package at D:\Programming\JabRefOnline\node_modules\@VUE\apollo-composable\package.json
```
(I think this is windows specific)

This is fixed by removing the generic `./*` export field.
@Akryum
Copy link
Member

Akryum commented Aug 14, 2024

I'm not sure to understand what this change solves; btw it's technically a breaking change as it disallows importing a module that is not specified on the exports.

@tobiasdiez
Copy link
Author

The exports field defines the public API and according to https://nodejs.org/api/packages.html#package-entry-points

It is best to explicitly specify entry points so that the package's public API is well-defined.

I can of course also add more export paths if the current ones don't cover the complete public api.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants