Skip to content

Commit

Permalink
perf(nuxt): ensure prefetchComponents is treeshaken on server (#27905)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mini-ghost authored and danielroe committed Jun 29, 2024
1 parent 7fa9577 commit 3c2eebd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/nuxt/src/app/composables/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const preloadComponents = async (components: string | string[]) => {
* @since 3.0.0
*/
export const prefetchComponents = (components: string | string[]) => {
if (import.meta.server) { return }

// TODO
return preloadComponents(components)
}
Expand Down

0 comments on commit 3c2eebd

Please sign in to comment.