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

Custom Renderer #136

Closed
PaulBGD opened this issue Dec 6, 2016 · 3 comments
Closed

Custom Renderer #136

PaulBGD opened this issue Dec 6, 2016 · 3 comments

Comments

@PaulBGD
Copy link
Member

PaulBGD commented Dec 6, 2016

Currently there's no way to use a custom renderer (see react renders for rendering to canvas, native, terminal, etc.)

@Rich-Harris
Copy link
Member

There's nothing to stop an external package from implementing a custom renderer that follows the Svelte component spec (such as it is) – in fact I'm currently in the process of creating svelte-ssr which is basically exactly that. The question is the extent to which the core compiler is extensible enough to allow custom renderers to do their thing without reimplementing a lot of the tricky stuff.

With svelte-ssr I'm finding that it's just different enough that it deserves to be completely separate from the main compiler. I don't know how far that applies to those other examples. There are also cases where you might just want to hook into the compiler to add first class support for Redux/MobX/GraphQL/whatever.

For now I think it's early enough that we're better off thinking of those things as separate packages and learning which bits make sense to be plugins/hooks/whatever, and which truly belong in core.

@PaulBGD
Copy link
Member Author

PaulBGD commented Dec 6, 2016

Oh definitely I think that these things should be separate packages. I should have been more clear, I was referring to the core compiler being extensible enough (without requiring copying large amounts of code) to allow custom renderers (which I don't think it currently is).

@Rich-Harris Rich-Harris added this to the one day milestone Dec 10, 2016
@Rich-Harris
Copy link
Member

Will close this issue as it's a little vague; we should tackle specific cases as they arise

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

2 participants