Skip to content

feat: Svelte renderer#30

Open
elliott-with-the-longest-name-on-github wants to merge 11 commits intocomarkdown:mainfrom
elliott-with-the-longest-name-on-github:elliott/svelte-renderer
Open

feat: Svelte renderer#30
elliott-with-the-longest-name-on-github wants to merge 11 commits intocomarkdown:mainfrom
elliott-with-the-longest-name-on-github:elliott/svelte-renderer

Conversation

@elliott-with-the-longest-name-on-github

Adds a Svelte renderer.

This works very similarly to React, but has two exports -- one that works today (Comark) and one that works tomorrow (ComarkAsync). Eventually (when async is stable), we'd get rid of the sync version and ship the async version as the only one. This would have to happen in a subsequent major.

Originally I had this set up as a comark/svelte package, but I couldn't figure out how to get it to play nicely with the bundling setup there. (Svelte libraries shouldn't be bundled, but we do typically run preprocessing on them to create d.ts files.) I also wanted to set up both SSR and browser tests so we can verify the rendering behavior on both ends.

Happy to redesign and move things around.

@vercel
Copy link

vercel bot commented Mar 3, 2026

@elliott-with-the-longest-name-on-github is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comark Ready Ready Preview Mar 4, 2026 1:07pm

@farnabaz
Copy link
Contributor

farnabaz commented Mar 6, 2026

Thanks for the PR @elliott-with-the-longest-name-on-github ❤️

I tried to create an example in examples directory, but it seems that users need to enable experimental.async in order to use package. Although that I didn't use async component. If I comment export { default as ComarkAsync } from './ComarkAsync.svelte' line in index.ts it works fine.

What do you think about this? What if we create @comark/svelte/async export for now and separate this component from others to let user use sync version?

I pushed my the example to PR

@elliott-with-the-longest-name-on-github

@farnabaz ahhh yeah, you're right -- I meant to fix that. The subpath export is the right solution. I'll get it put together

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.

2 participants