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

Unknown file extension ".svelte" for /node_modules/@portabletext/svelte/PortableText.svelte #28

Open
MathiasWP opened this issue May 10, 2023 · 8 comments
Labels

Comments

@MathiasWP
Copy link

When used in a Sveltekit project

@emilaleksanteri
Copy link

I get the same issue after I updated my repo from svelte 3 to 4 when running a testing-library/svelte test in vitest on my svelte portable text components

@emilaleksanteri
Copy link

When used in a Sveltekit project

Have you managed to overcome this issue btw?

@MathiasWP
Copy link
Author

When used in a Sveltekit project

Have you managed to overcome this issue btw?

I haven't tried since i created this issue. I forked the repo, made some changes to the codebase, and copied it over to our project.

@emilaleksanteri
Copy link

When used in a Sveltekit project

Have you managed to overcome this issue btw?

I haven't tried since i created this issue. I forked the repo, made some changes to the codebase, and copied it over to our project.

Is it sensitive information to share or can you tell which parts were broken in the library for you?

@MathiasWP
Copy link
Author

When used in a Sveltekit project

Have you managed to overcome this issue btw?

I haven't tried since i created this issue. I forked the repo, made some changes to the codebase, and copied it over to our project.

Is it sensitive information to share or can you tell which parts were broken in the library for you?

No parts were broken, but when copying over the code our TypeScript started screaming at our editor. So i mostly fixed the TypeScript types

@emilaleksanteri
Copy link

When used in a Sveltekit project

Have you managed to overcome this issue btw?

I haven't tried since i created this issue. I forked the repo, made some changes to the codebase, and copied it over to our project.

Is it sensitive information to share or can you tell which parts were broken in the library for you?

No parts were broken, but when copying over the code our TypeScript started screaming at our editor. So i mostly fixed the TypeScript types

Oh okay sounds good, I'll do the same then haha thank u!

@atu-record
Copy link

atu-record commented Dec 5, 2023

i had this issue only occur when developing in a monorepo. outside the monorepo it works properly

edit:
during monorepo development adding
ssr: { noExternal: ['@portabletext/svelte'] } to viteconfig supressed the issue for us as a workaround. hope this helps someone

@stipsan stipsan added the triaged label Jan 2, 2024
@cast-iron-developer
Copy link

I was able to solve this issue by just adding: export const ssr = false; to my +page.server.js file for the respective +page.svelte file that was displaying this issue.

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

No branches or pull requests

5 participants