svelte-carousel icon indicating copy to clipboard operation
svelte-carousel copied to clipboard

Missing Exports Condition Warning in Sveltekit

Open fractalmandala opened this issue 1 year ago • 6 comments

Using this library in Sveltekit is showing a missing exports condition warning:

The following packages have a svelte field in their package.json but no exports condition for svelte.
[email protected]
Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition for details.

At the link:

If you see a warning logged for this when using a Svelte library, please tell the library maintainers.

Using the svelte field in package.json to point at .svelte source files is deprecated and you must use a svelte export condition. vite-plugin-svelte 3 still resolves it as a fallback, but in a future major release this is going to be removed and without exports condition resolving the library is going to fail.

Example:

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

fractalmandala avatar Mar 03 '24 20:03 fractalmandala

https://github.com/vadimkorr/svelte-carousel/pull/158

Looks like it's waiting to be merged or whatever.


And it's not likely to be done any time soon, so if you can, best to fork it and manage it yourself.

darkwiz666 avatar Mar 13 '24 08:03 darkwiz666

It looks like the PR was deleted for no reason :( This should be pretty important because this package will not be able to continue working on future versions of vite

jalamprea avatar Apr 01 '24 14:04 jalamprea

I saw this too. Is this project not maintained anymore?

MarcGodard avatar Jul 09 '24 16:07 MarcGodard

@vadimkorr When can we expect this to be fixed and released? Thanks!

mitjakukovec avatar Aug 21 '24 09:08 mitjakukovec