Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nuxt): ensure prefetchComponents be treeshake on server #27905

Merged
merged 1 commit into from
Jun 29, 2024

Conversation

Mini-ghost
Copy link
Contributor

🔗 Linked issue

N/A

📚 Description

Before

export const prefetchComponents = (components: string | string[]) => {
  return preloadComponents(components)
}
Before

prefetchComponents and preloadComponents are both not tree shaken on the server side.

After

export const prefetchComponents = (components: string | string[]) => {
  if (import.meta.server) { return }
  return preloadComponents(components)
}
After

prefetchComponents and preloadComponents are both tree shaken on the server side.

@Mini-ghost Mini-ghost requested a review from danielroe as a code owner June 28, 2024 17:42
Copy link

stackblitz bot commented Jun 28, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants