diff --git a/sites/svelte.dev/svelte.config.js b/sites/svelte.dev/svelte.config.js index efd62e2289..259b973ff9 100644 --- a/sites/svelte.dev/svelte.config.js +++ b/sites/svelte.dev/svelte.config.js @@ -12,12 +12,13 @@ export default { prerender: { // TODO: REMOVE handleMissingId: 'ignore', - entries: [ - '*', - ...get_tutorial_list(get_tutorial_data()).flatMap(({ tutorials }) => - tutorials.map((tutorial) => /** @type {`/${string}`} */ ('/tutorial/' + tutorial.slug)) - ), - ], + entries: ['*', ...tutorial_entries()], }, }, }; + +function tutorial_entries() { + return get_tutorial_list(get_tutorial_data()).flatMap(({ tutorials }) => + tutorials.map((tutorial) => /** @type {`/${string}`} */ ('/tutorial/' + tutorial.slug)) + ); +}