perf(nuxt): ensure `prefetchComponents` is treeshaken on server (#27905)

This commit is contained in:
Alex Liu 2024-06-29 18:57:16 +08:00 committed by Daniel Roe
parent 7fa957729d
commit 3c2eebd5b9
No known key found for this signature in database
GPG Key ID: CBC814C393D93268
1 changed files with 2 additions and 0 deletions

View File

@ -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)
}