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

Fix missing exports condition #370

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

statox
Copy link

@statox statox commented Dec 16, 2023

When building a project with dependencies:

"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"svelte": "^4.2.3",
"vite": "^5.0.0",

"p5-svelte": "^3.1.2",

We get the following warning:

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

[email protected]

This MR reuses the example from the doc for this error to fix the warning and ensure this lib won't break in the future.

Using the svelte field in package.json to point at .svelte source files is deprecated and you must use a svelte export condition. vite-plugin-svelte 3 still resolves it as a fallback, but in a future major release this is going to be removed and without exports condition resolving the library is going to fail.


Btw thanks for this project it's super convenient 👍

Copy link

netlify bot commented Dec 16, 2023

Deploy Preview for p5-svelte failed.

Name Link
🔨 Latest commit a55fd2c
🔍 Latest deploy log https://app.netlify.com/sites/p5-svelte/deploys/657de64a0c1567000887338e

@womogenes
Copy link

Came here to request the same fix. +1 for this PR :)

@statox
Copy link
Author

statox commented Jul 15, 2024

Hey @rbrdl and @tonyketcham do you have any comments/questions/concerns about this MR?

I'm looking into this dependency again today and I would love to get it fixed because that's quite a nice wrapper. I see that the CI checks are all failing and that you have #371 which I think would be fixed with this MR. Let me know if I can be of any help :)

@leon-obrm
Copy link

Adding my comment here in hopes of getting this fix into main.
I'm currently using p5 in my project and would love to be able to use this library :)

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

Successfully merging this pull request may close these issues.

3 participants