Vue Updates
110 subscribers
672 photos
820 links
Channel for automatic notifications about updates in the Vue ecosystem.

Watching: vue, nuxt, vuetify, vue-i18n-next, vue-router, pinia and vite

Contacts: @Black_Yuzia

Our channels:
@Vue_Courses
@Vue_Updates
@frontendmasters_courses
Download Telegram
Vue Updates
NuxtJS v3.10.0 #nuxt3.10.0 is the next minor/feature release. πŸ‘€ Highlights v3.10 comes quite close on the heels of v3.9, but it's packed with features and fixes. Here are a few highlights. ✨ Experimental shared asyncData when prerendering When prerendering…
It is particularly important to make sure that any unique key of your data is always resolvable to the same data. For example, if you are using useAsyncData to fetch data related to a particular page, you should provide a key that uniquely matches that data. (useFetch should do this automatically.)

πŸ‘‰ See full documentation.

πŸ†” SSR-safe accessible unique ID creation

We now ship a useId composable for generating SSR-safe unique IDs (#23368). This allows creating more accessible interfaces in your app. For example:
">
<script setup>
const emailId = useId()
const passwordId = useId()
>script>

<template>
<form>
<label :for="emailId">Email>label>
<input
:id="emailId"
name="email"
type="email"
>
<label :for="passwordId">Password>label>
<input
:id="passwordId"
name="password"
type="password"
>
>form>
>template>


✍️ Extending app/router.options

It's now possible for module authors to inject their own router.options files (#24922). The new pages:routerOptions hook allows module authors to do things like add custom scrollBehavior or add runtime augmenting of routes.

πŸ‘‰ See full documentation.

Client-side Node.js support

We now support (experimentally) polyfilling key Node.js built-ins (#25028), just as we already do via Nitro on the server when deploying to non-Node environments.

That means that, within your client-side code, you can import directly from Node built-ins (node: and node imports are supported). However, nothing is globally injected for you, to avoid increasing your bundle size unnecessarily. You can either import them where needed.
import { Buffer } from 'node:buffer'
import process from 'node:process'

Or provide your own polyfill, for example, inside a Nuxt plugin.
// ~/plugins/node.client.ts
import { Buffer } from 'node:buffer'
import process from 'node:process'

globalThis.Buffer = Buffer
globalThis.process = process

export default defineNuxtPlugin({})

This should make life easier for users who are working with libraries without proper browser support. However, because of the risk in increasing your bundle unnecessarily, we would strongly urge users to choose other alternatives if at all possible.

πŸͺ Better cookie reactivity

We now allow you to opt-in to using the CookieStore. If browser support is present, this will then be used instead of a BroadcastChannel to update useCookie values reactively when the cookies are updated (#25198).

This also comes paired with a new composable, refreshCookie which allows manually refreshing cookie values, such as after performing a request. See full documentation.

πŸ₯ Detecting anti-patterns

In this release, we've also shipped a range of features to detect potential bugs and performance problems.

● We now will throw an error if setInterval is used on server (#25259).
● We warn (in development only) if data fetch composables are used wrongly (#25071), such as outside of a plugin or setup context.
● We warn (in development only) if you are not using but have the vue-router integration enabled (#25490). ( should not be used on its own.)

πŸ§‚ Granular view transitions support

It's now possible to control view transitions support on a per-page basis, using definePageMeta (#25264).

You need to have experimental view transitions support enabled first:
export default defineNuxtConfig({
experimental: {
viewTransition: true
},
app: {
// you can disable them globally if necessary (they are enabled by default)
viewTransition: false
}
})

And you can opt in/out granularly:
definePageMeta({ viewTransition: false }) ">
// ~/pages/index.vue
<script setup lang="ts">
definePageMeta({
viewTransition: false
})
script>

Finally, Nuxt will not apply View Transitions if the user's browser matches prefers-reduced-motion: reduce (#22292). You can set viewTransition: 'always'; it will then be up to you to respect the user's preference.

πŸ—οΈ Build-time route metadata
v4.3.0

#router #vue_router

4.3.0 (2024-02-21)
Bug Fixes
● check document for browser instead of window (#2042) (5631732)

● decode hash when parsing urls (#2061) (6f160b9), closes #2060

● guards: run beforeRouteEnter with app context (#2117) (6a69696), closes vuejs/router#2051

● handle undefined path in router resolve (0ec4862)

● keep optional params coming from a parent record (#2031) (04b50e5)

Features
● (internal) add types for unplugin-vue-router (2d1dd2a).

source
v4.3.1

#router #vue_router

4.3.1 (2024-04-17)

source
v4.3.2

#router #vue_router

4.3.2 (2024-04-18)
Bug Fixes
● Revert "fix: avoid normalizing the fullPath (#2189)" (b78aa98), closes vuejs/router#2216. This was creating other bugs when reusing a normalized location (common pattern). The original issue wasn't a problem in practice as the consistent values are the query, params, and hash.

source
v4.3.3

#router #vue_router

Please refer to CHANGELOG.md for details.

source
🀨1
v4.4.0-alpha.0

#router #vue_router

Please refer to CHANGELOG.md for details.

source
v4.4.0-alpha.1

#router #vue_router

Please refer to CHANGELOG.md for details.

source
v4.4.0-alpha.2

#router #vue_router

Please refer to CHANGELOG.md for details.

source
v4.4.0-alpha.3

#router #vue_router

Please refer to CHANGELOG.md for details.

source
v4.4.0

#router #vue_router

4.4.0 (2024-06-21)
This version introduces native support for typed routes via the RouteNamedMap. It is now possible to define a map without unplugin-vue-router and have the types inferred automatically. It is still recommended to use unplugin-vue-router to automatically generate these types. Features
● add a clearRoutes method (abe223d)

● typed routes (f92282b)

Bug Fixes
● allow arbitrary strings in RouteLocationRaw (a7a8452)

source
v4.4.1

#router #vue_router

4.4.1 (2024-07-31)
Bug Fixes
● router typescript definitions related to vue package (#2295) (a495ce0)

● types: stricter meta with required fields (423d9f7)

Features
● warn: fix links to docs (0cb5797)

source
v4.4.2

#router #vue_router

4.4.2 (2024-08-01)
Bug Fixes
● types: revert stricter meta (d4d0087), closes #2319

source
v4.4.3

#router #vue_router

4.4.3 (2024-08-06)
Bug Fixes
● reorder exports in package.json (#2323) (7422b15)

source
v4.4.4

#router #vue_router

4.4.4 (2024-09-10)
Bug Fixes
● ssr: handle symboless Modules in dynamic imports (#2355) (4861467)

Features
● loaders: internal mods in route records (5ff2cd0)

source
v4.4.5

#router #vue_router

4.4.5 (2024-09-13)
Bug Fixes
● make internal property non enumerable to avoid errors with {{route}} (a8df616)

source
v4.5.0

#router #vue_router

4.5.0 (2024-11-25)

Bug Fixes

● combining 'end' and 'strict' (#2154) (ab62098)
● custom directive doesn't work when custom=true (#2377) (0d8d997)
● router: allow duplicated navigation on back + redirect (#2133) (d992bb2)

Features

● link: add view-transition prop (#2356) (e978eb8)
● throw if parent and child routes have the same name (#2267) (8c73877)

source
v4.5.1

#router #vue_router

4.5.1 (2025-04-25)

Bug Fixes

● missing viewTransition prop on RouterLink (#2465) (2ddd19f)

Features

● activate madvue banner (#2480) (8e38733)
● memory history stores state (#2491) (24ff936)
● types: add support for children routes as union (#2475) (0ce408d)

source