4 ms·
It can't 'compile' to HTML, because it doesn't know at compile time what data you're going to give the component. Instead, if you compile with `ssr: true`, the
by rich_harris 7y ago
It can't 'compile' to HTML, because it doesn't know at compile time what data you're going to give the component. Instead, if you compile with `ssr: true`, the JavaScript it generates is a module that generates HTML through efficient string concatenation. It's very easy to bake out static files as part of a build step, or generate markup dynamically as part of a Node server.
CSS is extracted at build time; typically your styles will be served as static .css files for maximum efficiency.