Repository navigation
Replies: 4 comments 1 reply
|
Worth checking how those globals are being registered before treating it as a pure regression, because the two registration paths age very differently in Nuxt:
export default defineNuxtPlugin(() => {
return { provide: { colorMode: ... } }
})Provided values are exposed as
If you share how the failing properties are registered, it's usually possible to say which of the three cases you're in from that alone. |
|
The underlying reason this changed between Nuxt 4.4.8 and 4.5.1 comes down to how Nuxt 4.5 upgraded its Vue 3.5 compiler pipeline and how Why It Changed in Nuxt 4.5
How to Fix / MigrateOption 1: The Idiomatic Nuxt Way (Composables in
|
This is not a Nuxt 4.5 core regressionI reproduced your exact scenario on a clean Nuxt 4.5.1 / Vue 3.5.40 app (production build, SSR output) and // plugins/provide-foo.ts -> { provide: { foo: 'FOO_FROM_PROVIDE' } }
// plugins/globalprops-bar.ts -> nuxtApp.vueApp.config.globalProperties.$bar = 'BAR_FROM_GLOBALPROPS'Rendered HTML from The code that puts Your own symptom is the tell: How
|

Uh oh!
There was an error while loading. Please reload this page.
After updating Nuxt from 4.4.8 to 4.5.1, plugin global properties registered via vueApp.config.globalProperties or returned by Nuxt plugins (e.g., $colorMode, $t, or custom $helper) are no longer directly accessible in component blocks.
They are now only accessible in templates by explicitly referencing $nuxt (e.g., $nuxt.$colorMode or $nuxt.$i18n), or by using their respective composables inside <script setup>.
All reactions