From 2b3746c70c422fe0245e4eb8b33308b519318a8c Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 18 Jan 2024 17:11:46 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> --- documentation/docs/25-build-and-deploy/99-writing-adapters.md | 2 +- packages/kit/src/exports/vite/index.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation/docs/25-build-and-deploy/99-writing-adapters.md b/documentation/docs/25-build-and-deploy/99-writing-adapters.md index aac887374d31..183d4c727981 100644 --- a/documentation/docs/25-build-and-deploy/99-writing-adapters.md +++ b/documentation/docs/25-build-and-deploy/99-writing-adapters.md @@ -24,7 +24,7 @@ export default function (options) { supports: { read: ({ config, route }) => { // Return `true` if the route with the given `config` can use `read` - // from `$app/server` in production, return `false`` if it can't. + // from `$app/server` in production, return `false` if it can't. // Or throw a descriptive error describing how to configure the deployment } } diff --git a/packages/kit/src/exports/vite/index.js b/packages/kit/src/exports/vite/index.js index 3f108800a4a8..7c8297faf3be 100644 --- a/packages/kit/src/exports/vite/index.js +++ b/packages/kit/src/exports/vite/index.js @@ -714,6 +714,7 @@ async function kit({ svelte_config }) { return { code: code.replace(/__SVELTEKIT_TRACK__\('(.+?)'\)/g, (_, label) => { (tracked_features[chunk.name + '.js'] ??= []).push(label); + // put extra whitespace at the end of the comment to preserve the source size and avoid interfering with source maps return `/* track ${label} */`; }), map: null // TODO we may need to generate a sourcemap in future