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

fix(vite): pass relative url as default base - #6637

Merged
pi0 merged 1 commit into
mainfrom
fix/vite-relative
Aug 15, 2022
Merged

fix(vite): pass relative url as default base#6637
pi0 merged 1 commit into
mainfrom
fix/vite-relative

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#14564

❓ 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

Interestingly, vite does not always use renderBuiltUrl but sometimes checks .base by itself. This sets a relative base as the default, which will mean that vite-inserted link preloads will point to the correct location with a dynamic base.

📝 Checklist

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

@danielroedanielroe 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 Aug 15, 2022
@danielroe
danielroe requested a review from pi0August 15, 2022 12:58
@danielroedanielroe self-assigned this Aug 15, 2022
@netlify

netlifyBot commented Aug 15, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit0700e56
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62fa42fa57439500083f831b

@pi0

pi0 commented Aug 15, 2022

Copy link
Copy Markdown
Member

LGTM. Shall we only make a reproduction to report in upstream for handling unhandled cases for renderBuiltUrl or is it impossible in some?

pi0
pi0 approved these changes Aug 15, 2022
@pi0
pi0 merged commit 385fa60 into mainAug 15, 2022
@pi0
pi0 deleted the fix/vite-relative branch August 15, 2022 13:10
@danielroe

Copy link
Copy Markdown
MemberAuthor

~> vitejs/vite#9680

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't working🔨 p3-minor-bugPriority 3: a bug in an edge case that only affects very specific usagevite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After adding onMounted in App.vue, the href of modulepreload has no baseURL prefix

2 participants

@danielroe@pi0