Skip to content

Add exports condition for Svelte in package.json #63

@mauroporras

Description

@mauroporras

The package uses the legacy svelte field in package.json, but is missing an exports condition for Svelte. This causes a warning in vite-plugin-svelte 3+, and the fallback to the legacy field will be removed in a future major release.

The fix is to add an exports condition pointing to the same file as the svelte field:

"exports": {
  ".": {
    "svelte": "./dist/index.js"
  }
}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions