Closed laxadev closed 2 months ago
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
Added PR: #52
You can find more information about this here https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition