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

The following packages have a svelte field in their package.json but no exports condition for svelte. #564

Open
mrexodia opened this issue Feb 7, 2024 · 1 comment

Comments

@mrexodia
Copy link

mrexodia commented Feb 7, 2024

Description

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

@egjs/[email protected]

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

Steps to check or reproduce

Run npm install in a project with the latest "@egjs/svelte-infinitegrid": "^4.11.1", and "@sveltejs/vite-plugin-svelte": "^3.0.2",.

Potential fix

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"
		}
	}
}
@BlueFoxPrime
Copy link

@daybrush hey! Are you planning to fix this? It’s really simple, can also open a PR if you want :)

See fix here for reference (should be backwards compatible):
tinymce/tinymce-svelte#50

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