svelte_sidebar
svelte_sidebar copied to clipboard
svelte_sidebar does not behave properly with svelte v4 and vite v5
- vite-plugin-svelte shows a warning when upgrade svelte version to ^4 and vite version to ^5. See warning bellow:
"devDependencies": { "@sveltejs/vite-plugin-svelte": "^3.1.1", "svelte": "^4.2.18", "vite": "^5.3.2" },
16:46:24 [vite-plugin-svelte] WARNING: The following packages have a svelte field in their package.json but no exports condition for svelte.
Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition for details.
- vite-plugin-svelte repository recomend the following:
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. 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" - }
- Some sidebar behaviours like "collapseTree: true" is not working after the mentioned upgrade and I wonder if it is related with the warning above.