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

warning when using sveltekit v2: The following packages have a svelte field in their package.json but no exports condition for svelte. #170

Open
thenbe opened this issue Dec 14, 2023 · 1 comment

Comments

@thenbe
Copy link
Contributor

thenbe commented Dec 14, 2023

Describe the bug
Using this package with sveltekit v2 shows a warning during vite dev or vite build:

8:42:57 PM [vite-plugin-svelte] WARNING: The following packages have a svelte field in their package.json but no exports condition for svelte.

@rgossiaux/svelte-headlessui@2.0.0

Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition for details.

Library version
@rgossiaux/svelte-headlessui: 2.0.0

@msdrigg
Copy link

msdrigg commented Dec 18, 2023

Seeing this in my build as well after upgrading. Looks easily fixible by

https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition

// package.json
  "files": ["dist"],
  "svelte": "dist/index.js",
+ "exports": {
+   ".": {
+     "svelte": "./dist/index.js"
+   }
  }

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

2 participants