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 Warning: Svelte field in package.json but no export condition for svelte. #196

Open
shawn636 opened this issue Jan 20, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@shawn636
Copy link

Summary

vite-plugin-svelte produces a warning message for svelte-forms-lib.

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

[email protected]

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

Steps to reproduce

Example Project

What is the current bug behavior?

Warning message displayed in console when running npm dev

What is the expected correct behavior?

No warning message should show

Relevant logs and/or screenshots

Possible fixes

Details about the missing exports condition is available here:

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

@shawn636 shawn636 added the bug Something isn't working label Jan 20, 2024
@waller-jhonatan
Copy link

Same for here:
image

@evdama
Copy link

evdama commented Jan 14, 2025

I'm getting the warning now. I've seen the last commit on svelte-forms-lib dates back to January 2022 so I'm wondering if it's still maintained? @tjinauyeung you're probably busy doing other things? 😆

@zoge
Copy link

zoge commented Jan 18, 2025

I also encountered this warning while using vite-plugin-svelte with the following packages:

[email protected]
[email protected]
It seems these packages don't define an explicit exports field in their package.json.

My environment:

Vite version: 6.0.7
vite-plugin-svelte version: 5.0.3
Node.js version: v20.18.1
Let me know if you need more details to reproduce the issue.

@evdama
Copy link

evdama commented Feb 25, 2025

Has sombody maybe done a local fix and would be able to provide a PR for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants