Closed
Description
SSR could potentially be something like this:
require( 'svelte/ssr/register' );
const renderWidget = require( './components/Widget.html' );
const html = renderWidget({
foo: 1,
bar: 2
});
Not exactly sure how progressive enhancement would be implemented, and whether it can be done in a zero-cost way, but it'd be pretty cool. I don't know whether it looks more like this (i.e. all components can be rendered as progressive enhancements)...
const widget = new Widget({
target: document.querySelector( 'main' ),
enhance: true
});
...or this (i.e. only components that we know up-front we will want to use that way get the extra code):
<!-- Widget.html -->
<p>i am a widget</p>
<script>
export default {
enhance: true,
// ...
};
</script>
Metadata
Metadata
Assignees
Labels
No labels