tabler / tabler-icons

A set of over 5700 free MIT-licensed high-quality SVG icons for you to use in your web projects.
https://tabler.io/icons
MIT License
18.31k stars 917 forks source link

Warn with vite-plugin-svelte: missing exports condition #941

Open fanshuai opened 11 months ago

fanshuai commented 11 months ago

The warning message

12:07:33 [vite-plugin-svelte] WARNING: The following packages have a svelte field in their package.json but no exports condition for svelte.

@tabler/icons-svelte@2.44.0

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

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

missing exports condition

| 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](https://nodejs.org/api/packages.html#conditional-exports). 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"
+   }
  }
craigcosmo commented 7 months ago

is this gonna fix soon ?

RabbiIslamRony commented 6 months ago

Any Update?