Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Making app/template.html a Svelte component #374

Open
btakita opened this issue Aug 23, 2018 · 1 comment
Open

Making app/template.html a Svelte component #374

btakita opened this issue Aug 23, 2018 · 1 comment
Labels

Comments

@btakita
Copy link
Contributor

btakita commented Aug 23, 2018

For posterity sake, why does app/template.html use % as a separator, instead of {}? Also, why not make app/template.html a svelte component?

@btakita btakita changed the title Making app/template.html a sapper component Making app/template.html a Svelte component Aug 23, 2018
@btakita
Copy link
Contributor Author

btakita commented Aug 29, 2018

To clarify, template.html is not a Svelte component, but a template file with % delimiters.

Svelte supports SSR, so it should be possible to make template.html a SSR svelte component. This would make the HTML rendering isomorphic.

In my case, I'm moving a custom koa/svelte SSR app to sapper. All of the HTML was rendered in Svelte components. However, when moving to Sapper, there's the existing template.html which is just a simple search/replace template.

I miss being able to use computed properties, helper functions, child components, etc, in the top level html template/component.

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

No branches or pull requests

2 participants