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

feat(vite)!: upgrade vite to v3 #5398

Merged
merged 58 commits into from Jul 21, 2022
Merged

feat(vite)!: upgrade vite to v3 #5398

merged 58 commits into from Jul 21, 2022

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Jun 10, 2022

📚 Description

This PR upgrades Vite to v3 beta.

There are a couple of fixes/refactors to note:

  1. We remove the workaround where we move build output files around, instead modifying chunk names (resolves Building to .output is placing public files in 2 separate locations nuxt#12178).

  2. We remove our runtime URL implementation, using new Vite support from feat: experimental.buildAdvancedBaseOptions vitejs/vite#8450.

    We'll track the development of this feature quite closely as it moves from experimental into the mainstream, but it will not break in a minor version so the current version constraint is safe.

resolves nuxt/nuxt#13780, resolves nuxt/nuxt#14267, resolves nuxt/nuxt#13953, resolves nuxt/nuxt#13247, resolves nuxt/nuxt#14341, resolves nuxt/nuxt#14327, resolves nuxt/nuxt#14354.

👉 Migration

Vite 3 is a major release with its own breaking changes. Users should read through the migration guide and make any updates necessary. (Other libraries may also have to be updated to work with Vite 3.)

There are no Nuxt-specific changes that users will need to make.

@danielroe danielroe self-assigned this Jun 10, 2022
@netlify
Copy link

netlify bot commented Jun 10, 2022

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit b832953
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62d929c43a09ac0008954999

@danielroe danielroe changed the title chore: upgrade vite to alpha chore: upgrade vite to v3 Jun 10, 2022
@danielroe danielroe force-pushed the chore/vite-3 branch 2 times, most recently from ffb68bf to bc7c929 Compare June 11, 2022 20:07
@danielroe danielroe changed the title chore: upgrade vite to v3 feat!: upgrade vite to v3 Jun 13, 2022
@danielroe danielroe changed the title feat!: upgrade vite to v3 feat(vite)!: upgrade vite to v3 Jun 13, 2022
@danielroe danielroe force-pushed the chore/vite-3 branch 2 times, most recently from f29a4f6 to 38826e3 Compare June 20, 2022 15:58
@patak-dev
Copy link

Linking to the externals regression PR (wip), 986264a could be reverted after we fix this

@misaon
Copy link
Contributor

misaon commented Jul 18, 2022

Waiting ❤️

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

LGTM. Locally tried base url options too.

@tylerforesthauser
Copy link

tylerforesthauser commented Jul 22, 2022

Hey guys! I'm excited to get using Vite 3 but I've noticed that this PR actually seems to overwrite user Vite settings (as set in nuxt.config).

I think perhaps the configs are provided here in the reverse order...

Hopefully it's something just this simple 😅

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