diff --git a/packages/nuxt/src/core/nitro.ts b/packages/nuxt/src/core/nitro.ts index ae73575601..2457b373e9 100644 --- a/packages/nuxt/src/core/nitro.ts +++ b/packages/nuxt/src/core/nitro.ts @@ -624,7 +624,7 @@ async function spaLoadingTemplate (nuxt: Nuxt) { try { if (existsSync(spaLoadingTemplate)) { - return readFileSync(spaLoadingTemplate, 'utf-8') + return readFileSync(spaLoadingTemplate, 'utf-8').trim() } } catch { // fall through if we have issues reading the file