apollo icon indicating copy to clipboard operation
apollo copied to clipboard

fix: remove generic package export

Open tobiasdiez opened this issue 1 year ago • 2 comments

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.

tobiasdiez avatar Jul 28 '24 11:07 tobiasdiez

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.

Akryum avatar Aug 14 '24 13:08 Akryum

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.

tobiasdiez avatar Aug 16 '24 11:08 tobiasdiez