apollo
apollo copied to clipboard
fix: remove generic package export
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'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.
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.