Add missing exports conditions
laxadev opened this issue · 2 comments
laxadev commented
You can find more information about this here https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition
ptrxyz commented
With latest versions of Svelte, this is required and throws nasty warnings all day long.
The fix is super simple, simply add the exports
object to the package.json
and it's all good:
...
"svelte": "dist/index.js",
"exports": {
".": {
"types": "./dist/ts/index.d.ts",
"svelte": "./dist/index.js"
}
},
...
edit: added types