-> v0.6.0

This commit is contained in:
Rich Harris
2018-02-03 13:09:31 -05:00
parent 6554fc8616
commit 5104abf329
3 changed files with 13 additions and 2 deletions

View File

@@ -151,7 +151,7 @@ function get_route_handler(get_assets, get_routes) {
if (route.type === 'page') {
// for page routes, we're going to serve some HTML
res.setHeader('Content-Type', 'text/html');
// preload main.js and current route
// TODO detect other stuff we can preload? images, CSS, fonts?
res.setHeader('Link', `<${client.main_file}>;rel="preload";as="script", <${client.routes[route.id]}>;rel="preload";as="script"`);