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

vite-plugin-svelte: missing exports condition warning (Routify 2.18.12) #543

Open
Roger-Sa opened this issue Feb 8, 2024 · 7 comments
Open

Comments

@Roger-Sa
Copy link

Roger-Sa commented Feb 8, 2024

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

@roxi/[email protected]

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

@Roger-Sa Roger-Sa changed the title vite-plugin-svelte: missing exports condition warning (Routify 2.18.12) vite-plugin-svelte: missing exports condition warning (Routify 2.18.12) Feb 8, 2024
@Roger-Sa Roger-Sa changed the title vite-plugin-svelte: missing exports condition warning (Routify 2.18.12) vite-plugin-svelte: missing exports condition warning (Routify 2.18.12) Feb 8, 2024
@sashasoft90
Copy link

Hi, same warning from @roxi/[email protected]

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

@roxi/[email protected]

My Packages:

  "devDependencies": {
    "@roxi/routify": "^3.0.0-next.212",
    "@sveltejs/vite-plugin-svelte": "^3.0.1",
    "@tsconfig/svelte": "^5.0.2",
    "svelte": "^4.2.8",
    "svelte-check": "^3.6.2",
    "tslib": "^2.6.2",
    "typescript": "^5.2.2",
    "vite": "^5.0.8",
    "vite-tsconfig-paths": "^4.3.1"
  },

@james-em
Copy link

james-em commented Feb 28, 2024

@jakobrosenberg

This is a very quick fix. I believe because of this declaration:

https://github.com/roxiness/routify/blob/next/package.json#L6

"svelte": "lib/runtime/index.js",

you just need to add here:

https://github.com/roxiness/routify/blob/next/package.json#L33

"svelte": "./lib/runtime/index.js",

which gives

    "exports": {
        ...
        ".": {
            ...
            "svelte": "./lib/runtime/index.js",
        },
        ...
    },

(Careful there is an extra ./ compared to the old declaration as described here: https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition

@jakobrosenberg
Copy link
Member

🎉 This issue has been resolved in version 3.0.0-next.216 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jakobrosenberg
Copy link
Member

Just realised this is for v2 and not v3. 😬

Copy link

🎉 This issue has been resolved in version 2.18.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

@james-em
Copy link

james-em commented Feb 29, 2024

@jakobrosenberg Thanks a lot! The warning is gone (Testing v3 here) you can close the issue :)

Edit: https://publint.dev/@roxi/[email protected]
Capture d’écran, le 2024-02-29 à 08 39 01

Appears to be working fine but

Copy link

🎉 This issue has been resolved in version 2.18.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

4 participants