Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svelte field in package.json is deprecated #9

Open
Synthetic-Dev opened this issue Jan 28, 2024 · 1 comment
Open

svelte field in package.json is deprecated #9

Synthetic-Dev opened this issue Jan 28, 2024 · 1 comment

Comments

@Synthetic-Dev
Copy link

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

image

@mrexodia
Copy link

mrexodia commented Feb 7, 2024

As usual with deprecation warnings like this the migration path is rather unclear. It looks like you need to change:

{
	"svelte": "./dist/index.js",
        "types": "./dist/index.d.ts"
}

To a construction like this (or actually you need to have both, since some tools are not compatible with this yet 🤦🏻‍♂️):

{
	"exports": {
		".": {
			"types": "./dist/index.d.ts",
			"svelte": "./dist/index.js"
		}
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants