Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(vite): do not inline dynamic imports in server #5506

Merged
merged 3 commits into from
Jul 6, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/nuxt#13819

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

See vitejs/vite#8571. We should be preserving dynamic imports for better performance (otherwise our Vue server ends up being a single file). This was likely a regression in vite that will be fixed, so this is a hotfix until that point.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added bug Something isn't working vite πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Jun 17, 2022
@danielroe danielroe requested a review from pi0 June 17, 2022 15:17
@danielroe danielroe self-assigned this Jun 17, 2022
@netlify
Copy link

netlify bot commented Jun 17, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit b15c864
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62c31e232b85a600093e26ac

@pi0
Copy link
Member

pi0 commented Jul 6, 2022

@antfu Would you please check this PR? Also is it relevant when we enable vite-node?

@danielroe
Copy link
Member Author

danielroe commented Jul 6, 2022

This fix has already been merged in upstream in vite 3: vitejs/vite#8641. This just backports it to Nuxt until we upgrade.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage vite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ssr does not properly handle dynamic import correctly in onMounted
2 participants