Skip to content

Fix npm package resolution by adding exports field to package.json#6158

Open
alexgleason wants to merge 1 commit intoplausible:masterfrom
alexgleason:fix/npm-package-exports
Open

Fix npm package resolution by adding exports field to package.json#6158
alexgleason wants to merge 1 commit intoplausible:masterfrom
alexgleason:fix/npm-package-exports

Conversation

@alexgleason
Copy link

Changes

Add exports field to the npm package's package.json. The package currently only declares module (no main or exports), which causes modern bundlers like Vite and SvelteKit to fail with:

Failed to resolve entry for package "@plausible-analytics/tracker". The package may have incorrect main/module/exports specified in its package.json.

The module field is kept for backward compatibility with older bundlers.

Fixes #5879
See also: https://publint.dev/@plausible-analytics/tracker@0.4.4

Tests

  • This PR does not require tests

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The package may have incorrect main/module/exports specified in its package.json

1 participant