From 5f82002927d96f2da32c4a2e7af790f76004241e Mon Sep 17 00:00:00 2001 From: sevichecc <91365763+Sevichecc@users.noreply.github.com> Date: Sat, 10 Dec 2022 02:40:13 +0800 Subject: [PATCH] fix trailingSlash --- src/routes/+layout.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 2b28436b..c49c6d8d 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -1,9 +1,6 @@ import type { LayoutLoad } from './$types' export const prerender = true -export const trailingSlash = - !Object.keys(process.env).some(key => ['VERCEL', 'CF_PAGES', 'NETLIFY'].includes(key)) && process.env.ADAPTER !== 'node' - ? 'always' - : undefined +export const trailingSlash = 'always' export const load: LayoutLoad = async ({ url, fetch }) => ({ path: url.pathname, res: await fetch('/posts.json').then(res => res.json())