From 2b75414f4763573280e2478c9f2007921ec45bf6 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 3 Feb 2023 04:50:17 -0800 Subject: [PATCH] perf(nuxt): cache result of importing styles module (#18734) --- packages/nuxt/src/core/runtime/nitro/renderer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/core/runtime/nitro/renderer.ts b/packages/nuxt/src/core/runtime/nitro/renderer.ts index d05d0fad46..021a171130 100644 --- a/packages/nuxt/src/core/runtime/nitro/renderer.ts +++ b/packages/nuxt/src/core/runtime/nitro/renderer.ts @@ -69,7 +69,7 @@ const getStaticRenderedHead = (): Promise => import('#head-static').th const getServerEntry = () => import('#build/dist/server/server.mjs').then(r => r.default || r) // @ts-ignore -const getSSRStyles = (): Promise Promise>> => import('#build/dist/server/styles.mjs').then(r => r.default || r) +const getSSRStyles = lazyCachedFunction((): Promise Promise>> => import('#build/dist/server/styles.mjs').then(r => r.default || r)) // -- SSR Renderer -- const getSSRRenderer = lazyCachedFunction(async () => {