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

Add missing exports conditions #50

Closed
laxadev opened this issue Dec 15, 2023 · 2 comments
Closed

Add missing exports conditions #50

laxadev opened this issue Dec 15, 2023 · 2 comments

Comments

@laxadev
Copy link

laxadev commented Dec 15, 2023

You can find more information about this here https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition

@ptrxyz
Copy link
Contributor

ptrxyz commented Jan 18, 2024

With latest versions of Svelte, this is required and throws nasty warnings all day long.

The fix is super simple, simply add the exports object to the package.json and it's all good:

...
"svelte": "dist/index.js",
  "exports": {
    ".": {
      "types": "./dist/ts/index.d.ts",
      "svelte": "./dist/index.js"
    }
  },
...

edit: added types

@ptrxyz
Copy link
Contributor

ptrxyz commented Jan 18, 2024

Added PR: #52

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

No branches or pull requests

3 participants