egjs-infinitegrid icon indicating copy to clipboard operation
egjs-infinitegrid copied to clipboard

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

Open mrexodia opened this issue 1 year ago • 1 comments

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"
		}
	}
}

mrexodia avatar Feb 07 '24 23:02 mrexodia

@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): https://github.com/tinymce/tinymce-svelte/issues/50

BlueFoxPrime avatar Mar 23 '24 12:03 BlueFoxPrime