-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(nuxt, vite): do not use cjs utils to resolve/alias vue #21837
Conversation
Run & review this pull request in StackBlitz Codeflow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if you have already tested it against latest nitro.
We had to get rid of this workaround sooner or later.
Also linking to unjs/nitro#1118 which might be needed to dedup external vue
I've tested it in the framework repo here. Are there module resolution changes coming upstream from nitro? |
Only that we might start to apply runtime-keys worker conditions to worker targets which i don't think Vue is having them and should be fine.. |
I think this might have broken this particular Nuxt Config setting (Nuxt 3.6.2 with Nitro 2.5.2):
I now get a bunch of |
@sei-jdshimkoski Maybe you you could open an issue with reproduction? I don't have an issue with that code in a minimal sandbox. |
Same question. Did you fix it? |
Sorry, was out of town and away from my computer. I'll try to open an issue with reproduction today. |
Ticket is here: #22127 |
The only change in that minimal reproduction is the vite manualChunks setting in the nuxt config file. |
π Linked issue
#14146
β Type of change
π Description
Vite and Nitro correctly resolve vue dependencies, and it is far better to defer resolution to the bundlers than override it ourselves, particularly with support for non-hoist:
You can test with this plugin:
Details
(In my testing, before this PR, with
externalVue: false
vue was actually being bundled twice in nitro bundle.)π Checklist