svelte-headlessui
svelte-headlessui copied to clipboard
warning when using sveltekit v2: The following packages have a svelte field in their package.json but no exports condition for svelte.
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/[email protected]
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
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"
+ }
}