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

fix(vite): warmup improvements#7377

Merged
pi0 merged 3 commits intomainfrom
fix/vite-warmup
Sep 9, 2022
Merged

fix(vite): warmup improvements#7377
pi0 merged 3 commits intomainfrom
fix/vite-warmup

Conversation

@danielroe
Copy link
Copy Markdown
Member

🔗 Linked issue

❓ 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

These are some small improvements to improve warmup consistency.

wdyt @antfu?

📝 Checklist

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

@danielroe danielroe added bug Something isn't working vite 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels Sep 9, 2022
@danielroe danielroe requested a review from antfu September 9, 2022 09:11
@danielroe danielroe self-assigned this Sep 9, 2022
@netlify
Copy link
Copy Markdown

netlify Bot commented Sep 9, 2022

Deploy Preview for nuxt3-docs ready!

Name Link
🔨 Latest commit e226461
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/631b035c18b7380009bcc9fd
😎 Deploy Preview https://deploy-preview-7377--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

const mod = await server.moduleGraph.getModuleByUrl(url, isServer)
const deps = Array.from(mod?.importedModules || [])
await Promise.all(deps.map(m => warmup(m.url.replace('/@id/__x00__', '\0'))))
const deps = mod?.ssrTransformResult?.deps /* server */ || Array.from(mod?.importedModules /* client */ || []).map(m => m.url)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@danielroe danielroe requested a review from pi0 September 9, 2022 09:41
@pi0 pi0 merged commit e4b8c2d into main Sep 9, 2022
@pi0 pi0 deleted the fix/vite-warmup branch September 9, 2022 09:54
@pi0
Copy link
Copy Markdown
Member

pi0 commented Sep 9, 2022

Thanks!

This was referenced Sep 14, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
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 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing vite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants