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

fix(vite): warmup improvements - #7377

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

fix(vite): warmup improvements#7377
pi0 merged 3 commits into
mainfrom
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.

@danielroedanielroe 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 antfuSeptember 9, 2022 09:11
@danielroedanielroe self-assigned this Sep 9, 2022
@netlify

netlifyBot commented Sep 9, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs ready!

NameLink
🔨 Latest commite226461
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/631b035c18b7380009bcc9fd
😎 Deploy Previewhttps://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 pi0September 9, 2022 09:41
@pi0
pi0 merged commit e4b8c2d into mainSep 9, 2022
@pi0
pi0 deleted the fix/vite-warmup branch September 9, 2022 09:54
@pi0

pi0 commented Sep 9, 2022

Copy link
Copy Markdown
Member

Thanks!

This was referenced Sep 14, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't working🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressingvite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@danielroe@pi0@antfu