-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Hi,
When installing and using @sveltejs/[email protected] in a Svelte + Vite project, I’m running into an error related to a missing export condition.
According to the Vite Svelte FAQ (Missing exports condition), this usually happens when the package.json is missing an "exports" field that defines the appropriate conditions (e.g., "svelte", "import", "require").
Steps to Reproduce
Create a fresh SvelteKit or Vite + Svelte project.
Install @sveltejs/[email protected]
Import and use the package in a component.
Run vite dev or vite build.
Expected Behavior
The package should resolve correctly without throwing a missing exports condition error.
Actual Behavior
Vite throws an error about a missing exports condition.
Possible Solution
Update package.json for svelte-virtual-list to include proper "exports" entries following the guidance in the Vite Svelte FAQ.
Example:
"exports": {
".": {
"types": "./dist/index.d.ts",
"svelte": "./dist/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
}
}
Thanks for looking into this!