Skip to content

fix(nuxt): resolve vue3 runtime plugin on Nuxt 4 - #2026

Merged
CodeDredd merged 1 commit into
1.xfrom
fix/nuxt4-plugin-resolution
Jul 19, 2026
Merged

fix(nuxt): resolve vue3 runtime plugin on Nuxt 4#2026
CodeDredd merged 1 commit into
1.xfrom
fix/nuxt4-plugin-resolution

Conversation

@CodeDredd

Copy link
Copy Markdown
Owner

The module resolved its runtime plugin via isNuxt3() ? '3' : '2', so any Nuxt major other than 3 — including Nuxt 4 — fell back to the Nuxt 2 plugin and the app broke.

This inverts the check to isNuxt2(nuxt) ? '2' : '3': only Nuxt 2 gets the vue2 plugin, every newer major (3, 4, …) resolves the vue3 plugin.

isNuxtMajorVersion() is not available in the @nuxt/kit version pinned on 1.x (3.12.3, added in 3.13), so the still-supported isNuxt2() is used instead. On main (v2) the module no longer has the vue2/vue3 split, so this only affects the 1.x line.

Verified with a local nuxt-module-build build.

fixes #2019

The module resolved the runtime plugin with isNuxt3(), so any Nuxt
version other than 3 (including Nuxt 4) fell back to the Nuxt 2 plugin.
Invert the check so only Nuxt 2 gets the vue2 plugin and every newer
major resolves the vue3 plugin.

fixes #2019
@CodeDredd
CodeDredd merged commit 71acd25 into 1.x Jul 19, 2026
10 checks passed
@CodeDredd
CodeDredd deleted the fix/nuxt4-plugin-resolution branch July 19, 2026 21:11
@github-actions github-actions Bot mentioned this pull request Jul 19, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.44%. Comparing base (edc781f) to head (1c6878d).
⚠️ Report is 1 commits behind head on 1.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              1.x    #2026   +/-   ##
=======================================
  Coverage   99.44%   99.44%           
=======================================
  Files          86       86           
  Lines        3048     3048           
  Branches      531      531           
=======================================
  Hits         3031     3031           
  Misses         14       14           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants