🚀 nuxt/nuxt - Release Notes
v3.16.2 (2025-04-01)
> 3.16.2 is the next patch release.
## ✅ Upgrading
Our recommendation for upgrading is to run:
```sh
npx nuxi@latest upgrade --dedupe
```
This will deduplicate your lockfile as well, and help ensure that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.16.1...v3.16.2)
### 🔥 Performance
- **nuxt:** Improve tree-shaking of `useRequestEvent` on client ([#31586](https://github.com/nuxt/nuxt/pull/31586))
### 🩹 Fixes
- **nuxt:** Pass down attrs to `` and `` ([#31513](https://github.com/nuxt/nuxt/pull/31513))
- **nuxt:** Use greedy catchall when `/index` is the last segment ([#31528](https://github.com/nuxt/nuxt/pull/31528))
- **nuxt:** Reset `page:loading:end` hook before navigation ([#31504](https://github.com/nuxt/nuxt/pull/31504))
- **nuxt:** Write initial cookie value if different from `document.cookie` ([#31517](https://github.com/nuxt/nuxt/pull/31517))
- **nuxt:** Support template string quotes in `resolveComponent` ([#31526](https://github.com/nuxt/nuxt/pull/31526))
- **nuxt:** Show fatal errors thrown in middleware ([#31518](https://github.com/nuxt/nuxt/pull/31518))
- **nuxt:** Use name to index route providers in dev ([#31544](https://github.com/nuxt/nuxt/pull/31544))
- **nuxt:** Improve default scroll behaviour ([#31545](https://github.com/nuxt/nuxt/pull/31545))
- **vite:** Return 404 for non-existent `_nuxt/` paths in development ([#31543](https://github.com/nuxt/nuxt/pull/31543))
- **nuxt:** Pass error data to `error.vue` ([#31573](https://github.com/nuxt/nuxt/pull/31573))
- **nuxt:** Use `unhead` v2 api in default welcome + error pages ([#31584](https://github.com/nuxt/nuxt/pull/31584))
- **nuxt:** Improve consistency of page metadata extraction ([#31306](https://github.com/nuxt/nuxt/pull/31306))
- **nuxt:** Do not remove meta when `scanPageMeta` is disabled ([0ba454b21](https://github.com/nuxt/nuxt/commit/0ba454b21))
### 💅 Refactors
- **nuxt:** Simplify conditional branches of `` ([#31561](https://github.com/nuxt/nuxt/pull/31561))
- Replace `useServerHead` in `onPrehydrate` with `useHead` ([#31585](https://github.com/nuxt/nuxt/pull/31585))
### 📖 Documentation
- Move custom directories note to the correct place ([#29100](https://github.com/nuxt/nuxt/pull/29100))
- Update example to `useTemplateRef` ([#31458](https://github.com/nuxt/nuxt/pull/31458))
- Provide async function for `$fetch` ([#31459](https://github.com/nuxt/nuxt/pull/31459))
- Mention the possibility to scan pages based on a pattern ([#31462](https://github.com/nuxt/nuxt/pull/31462))
- Add `dedupe` flag ([#31467](https://github.com/nuxt/nuxt/pull/31467))
- Improve `refreshNuxtData` docs ([#31448](https://github.com/nuxt/nuxt/pull/31448))
- Add missing `--` before `--template` ([#31469](https://github.com/nuxt/nuxt/pull/31469))
- Migrate to @nuxt/content v3 ([#31150](https://github.com/nuxt/nuxt/pull/31150))
- Fix icon for main docs ([e7828d9c6](https://github.com/nuxt/nuxt/commit/e7828d9c6))
- Save selected package manager ([#31520](https://github.com/nuxt/nuxt/pull/31520))
- Improve refresh nuxt data example ([#31487](https://github.com/nuxt/nuxt/pull/31487))
- Note that middleware runs on error pages as well ([df14c0263](https://github.com/nuxt/nuxt/commit/df14c0263))
- Replace all 'Nuxt 3' with 'Nuxt' in documentation ([#31519](https://github.com/nuxt/nuxt/pull/31519))
- `resolveComponent` only auto-imports components with literal strings ([#31511](https://github.com/nuxt/nuxt/pull/31511))
- Add ticks around `tsconfig.json` ([#31473](https://github.com/nuxt/nuxt/pull/31473))
- Capitalize heading ([#31523](https://github.com/nuxt/nuxt/pull/31523))
- Update links to unhead.unjs.io ([1913febbb](https://github.com/nuxt/nuxt/commit/1913febbb))
- Document that props are passed via server components via query ([db7688219](https://github.com/nuxt/nuxt/commit/db7688219))
- Improve description of `page:start` and `page:finish` hooks ([#31570](https://github.com/nuxt/nuxt/pull/31570))
### 🏡 Chore
- Ignore builds ([e34ae380d](https://github.com/nuxt/nuxt/commit/e34ae380d))
### ✅ Tests
- Avoid invalid nested font face ([#31524](https://github.com/nuxt/nuxt/pull/31524))
- Add test for loading indicator with custom key ([25ca9b819](https://github.com/nuxt/nuxt/commit/25ca9b819))
- Add test for custom prop + loading indicator ([94bfed031](https://github.com/nuxt/nuxt/commit/94bfed031))
- Update snapshot ([55134fc2a](https://github.com/nuxt/nuxt/commit/55134fc2a))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- Julien Huang (@huang-julien)
- Bobbie Goede (@BobbieGoede)
- Alex Liu (@Mini-ghost)
- Dennis Adriaansen (@dennisadriaans)
- Guillaume Chau (@Akryum)
- @beer (@iiio2)
- 翠 / green (@sapphi-red)
- xjccc (@xjccc)
- Hugo Richard (@HugoRCD)
- Sébastien Chopin (@atinux)
- Johannes Buchholz (@jhony1104)
- Alexander Lichter (@TheAlexLichter)
- Matej Černý (@cernymatej)
- Claudiu (@sofuxro)
v3.16.1 (2025-03-19)
[compare changes](https://github.com/nuxt/nuxt/compare/v3.16.0...v3.16.1)
### 🔥 Performance
- **nuxt:** Use browser cache for payloads ([#31379](https://github.com/nuxt/nuxt/pull/31379))
### 🩹 Fixes
- **nuxt:** Restore nuxt aliases to nitro compilerOptions.paths ([#31278](https://github.com/nuxt/nuxt/pull/31278))
- **nuxt:** Use new `mocked-exports` ([#31295](https://github.com/nuxt/nuxt/pull/31295))
- **nuxt:** Check resolved options for polyfills ([#31307](https://github.com/nuxt/nuxt/pull/31307))
- **nuxt:** Render style component html ([#31337](https://github.com/nuxt/nuxt/pull/31337))
- **nuxt:** Add missing lazy hydration prop in regex ([#31359](https://github.com/nuxt/nuxt/pull/31359))
- **nuxt:** Fully resolve nuxt dependencies ([#31436](https://github.com/nuxt/nuxt/pull/31436))
- **vite:** Don't show interim vite build output files ([#31439](https://github.com/nuxt/nuxt/pull/31439))
- **nuxt:** Ignore prerendering unprefixed public assets ([151912ec3](https://github.com/nuxt/nuxt/commit/151912ec3))
- **nuxt:** Use more performant router catchall pattern ([#31450](https://github.com/nuxt/nuxt/pull/31450))
- **nuxt:** Prevent param duplication in `typedPages` implementation ([#31331](https://github.com/nuxt/nuxt/pull/31331))
- **nuxt:** Sort route paths before creating route tree ([#31454](https://github.com/nuxt/nuxt/pull/31454))
### 📖 Documentation
- Update link to vercel edge network ([ec20802a5](https://github.com/nuxt/nuxt/commit/ec20802a5))
- Improve HMR performance note for Windows users ([#31301](https://github.com/nuxt/nuxt/pull/31301))
- Correct WSL note phrasing ([#31322](https://github.com/nuxt/nuxt/pull/31322))
- Fix typo ([#31341](https://github.com/nuxt/nuxt/pull/31341))
- Adjust `app.head` example ([#31350](https://github.com/nuxt/nuxt/pull/31350))
- Include package manager options in update script ([#31346](https://github.com/nuxt/nuxt/pull/31346))
- Add missing comma ([#31362](https://github.com/nuxt/nuxt/pull/31362))
- Add mention of `addServerTemplate` to modules guide ([#31369](https://github.com/nuxt/nuxt/pull/31369))
- Add `rspack` and remove `test-utils` for monorepo guide ([#31371](https://github.com/nuxt/nuxt/pull/31371))
- Adjust example ([#31372](https://github.com/nuxt/nuxt/pull/31372))
- Update experimental docs ([#31388](https://github.com/nuxt/nuxt/pull/31388))
- Use `ini` syntax block highlighting for `.env` files ([f79fabe46](https://github.com/nuxt/nuxt/commit/f79fabe46))
- Improve `useHydration` docs ([#31427](https://github.com/nuxt/nuxt/pull/31427))
- Update broken docs links ([#31430](https://github.com/nuxt/nuxt/pull/31430))
- Mention possibility of prerendering api routes ([#31234](https://github.com/nuxt/nuxt/pull/31234))
### 🏡 Chore
- Fix gitignore ([6fe9dff7e](https://github.com/nuxt/nuxt/commit/6fe9dff7e))
- Bump axios dependency in lockfile ([c3352e80b](https://github.com/nuxt/nuxt/commit/c3352e80b))
- Lint repo ([2ab20bfdc](https://github.com/nuxt/nuxt/commit/2ab20bfdc))
- Add scorecard badge ([#31302](https://github.com/nuxt/nuxt/pull/31302))
- Dedupe ([be5d85f2b](https://github.com/nuxt/nuxt/commit/be5d85f2b))
### ✅ Tests
- Migrate runtime compiler test to playwright (+ add test cases) ([#31405](https://github.com/nuxt/nuxt/pull/31405))
- Migrate spa preloader tests to playwright ([#31273](https://github.com/nuxt/nuxt/pull/31273))
- Use `srvx` and random port for remote provider ([#31432](https://github.com/nuxt/nuxt/pull/31432))
### 🤖 CI
- Automate release on merge of of v3/v4 ([6ae5b5fdb](https://github.com/nuxt/nuxt/commit/6ae5b5fdb))
- Fix workflow quoting ([fef39cf3c](https://github.com/nuxt/nuxt/commit/fef39cf3c))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- Anoesj Sadraee (@Anoesj)
- Peter Radko (@Gwynerva)
- Adam DeHaven (@adamdehaven)
- Alex Liu (@Mini-ghost)
- Julien Huang (@huang-julien)
- Francesco Agnoletto (@Kornil)
- Guillaume Chau (@Akryum)
- imreegall (@imreegall)
- xjccc (@xjccc)
- Sam Blowes (@blowsie)
- Nimit012 (@Nimit012)
- Camille Coutens (@Kamsou)
v3.16.0 (2025-03-07)
## 👀 Highlights
There's a lot in this one!
### ⚡️ A New New Nuxt
Say hello to `create-nuxt`, a new tool for starting Nuxt projects (big thanks to [@devgar](https://github.com/devgar) for donating the package name)!
It's a streamlined version of `nuxi init` - just a sixth of the size and bundled as a single file with all dependencies inlined, to get you going as fast as possible.
Starting a new project is as simple as:
```bash
npm create nuxt
```

Special thanks to [@cmang](https://github.com/cmang) for the [beautiful ASCII-art](https://bsky.app/profile/durdraw.org/post/3liadod3gv22a). ❤️
Want to learn more about where we're headed with the Nuxt CLI? Check out our roadmap [here](https://github.com/nuxt/cli/issues/648), including our plans for an [interactive modules selector](https://github.com/nuxt/cli/issues/754).
### 🚀 Unhead v2
We've upgraded to `unhead` v2, the engine behind Nuxt's `` management. This major version removes deprecations and improves how context works:
- For Nuxt 3 users, we're shipping a legacy compatibility build so nothing breaks
- The context implementation is now more direct via Nuxt itself
```ts
// Nuxt now re-exports composables while properly resolving the context
export function useHead(input, options = {}) {
const unhead = injectHead(options.nuxt)
return head(input, { head: unhead, ...options })
}
```
If you're using Unhead directly in your app, keep in mind:
1. Import from Nuxt's auto-imports or `#app/composables/head` instead of `@unhead/vue`
2. Importing directly from `@unhead/vue` might lose async context
Don't worry though - we've maintained backward compatibility in Nuxt 3, so most users won't need to change anything!
If you've opted into `compatibilityVersion: 4`, check out [our upgrade guide](https://nuxt.com/docs/getting-started/upgrade#unhead-v2) for additional changes.
### 🔧 Devtools v2 Upgrade
Nuxt Devtools has leveled up to v2 ([#30889](https://github.com/nuxt/nuxt/pull/30889))!
You'll love the new features like custom editor selection, Discovery.js for inspecting resolved configs (perfect for debugging), the return of the schema generator, and slimmer dependencies.
One of our favorite improvements is the ability to track how modules modify your Nuxt configuration - giving you X-ray vision into what's happening under the hood.
👉 Discover all the details in the [Nuxt DevTools release notes](https://github.com/nuxt/devtools/releases).
### ⚡️ Performance Improvements
We're continuing to make Nuxt faster, and there are a number of improvements in v3.16:
1. Using [`exsolve`](https://github.com/unjs/exsolve) for module resolution ([#31124](https://github.com/nuxt/nuxt/pull/31124)) along with the rest of the unjs ecosystem (nitro, c12, pkg-types, and more) - which dramatically speeds up module resolution
1. Smarter module resolution paths ([#31037](https://github.com/nuxt/nuxt/pull/31037)) - prioritizes direct imports for better efficiency
1. Eliminated duplicated Nitro alias resolution ([#31088](https://github.com/nuxt/nuxt/pull/31088)) - leaner file handling
1. Streamlined `loadNuxt` by skipping unnecessary resolution steps ([#31176](https://github.com/nuxt/nuxt/pull/31176)) - faster startups
1. Adopt `oxc-parser` for parsing in Nuxt plugins ([#30066](https://github.com/nuxt/nuxt/pull/30066))
All these speed boosts happen automatically - no configuration needed!
Shout out to [CodSpeed](https://codspeed.io/) with [Vitest benchmarking](https://vitest.dev/guide/features.html#benchmarking) to measure these improvements in CI - it has been really helpful.
To add some anecdotal evidence, my personal site at [roe.dev](https://github.com/danielroe/roe.dev) loads 32% faster with v3.16, and [nuxt.com](https://github.com/nuxt/nuxt.com) is 28% faster. I hope you see similar results! ⚡️
### 🕰️ Delayed Hydration Support
We're very pleased to bring you native delayed/lazy hydration support ([#26468](https://github.com/nuxt/nuxt/pull/26468))! This lets you control exactly when components hydrate, which can improve initial load performance and time-to-interactive. We're leveraging Vue's built-in hydration strategies - [check them out in the Vue docs](https://vuejs.org/guide/components/async.html#lazy-hydration).
```vue
```
You can also listen for when hydration happens with the `@hydrated` event:
```vue
```
Learn more about lazy hydration in [our components documentation](https://nuxt.com/docs/guide/directory-structure/components#delayed-or-lazy-hydration).
### 🧩 Advanced Pages Configuration
You can now fine-tune which files Nuxt scans for pages ([#31090](https://github.com/nuxt/nuxt/pull/31090)), giving you more control over your project structure:
```ts [nuxt.config.ts]
export default defineNuxtConfig({
pages: {
// Filter specific files or directories
pattern: ['**/*.vue'],
}
})
```
### 🔍 Enhanced Debugging
We've made debugging with the `debug` option more flexible! Now you can enable just the debug logs you need ([#30578](https://github.com/nuxt/nuxt/pull/30578)):
```ts [nuxt.config.ts]
export default defineNuxtConfig({
debug: {
// Enable specific debugging features
templates: true,
modules: true,
watchers: true,
hooks: {
client: true,
server: true,
},
nitro: true,
router: true,
hydration: true,
}
})
```
Or keep it simple with `debug: true` to enable all these debugging features.
### 🎨 Decorators Support
For the decorator fans out there (whoever you are!), we've added experimental support ([#27672](https://github.com/nuxt/nuxt/pull/27672)). As with all experimental features, feedback is much appreciated.
```ts [nuxt.config.ts]
export default defineNuxtConfig({
experimental: {
decorators: true
}
})
```
```ts
function something (_method: () => unknown) {
return () => 'decorated'
}
class SomeClass {
@something
public someMethod () {
return 'initial'
}
}
const value = new SomeClass().someMethod()
// returns 'decorated'
```
### 📛 Named Layer Aliases
It's been much requested, and it's here! Auto-scanned local layers (from your `~~/layers` directory) now automatically create aliases. You can access your `~~/layers/test` layer via `#layers/test` ([#30948](https://github.com/nuxt/nuxt/pull/30948)) - no configuration needed.
If you want named aliases for other layers, you can add a name to your layer configuration:
```ts [nuxt.config.ts]
export default defineNuxtConfig({
$meta: {
name: 'example-layer',
},
})
```
This creates the alias `#layers/example-layer` pointing to your layer - making imports cleaner and more intuitive.
### 🧪 Error Handling Improvements
We've greatly improved error messages and source tracking ([#31144](https://github.com/nuxt/nuxt/pull/31144)):
1. Better warnings for undefined `useAsyncData` calls with precise file location information
2. Error pages now appear correctly on island page errors ([#31081](https://github.com/nuxt/nuxt/pull/31081))
Plus, we're now using Nitro's beautiful error handling (powered by [youch](https://github.com/poppinss/youch)) to provide more helpful error messages in the terminal, complete with stacktrace support.
Nitro now also automatically applies source maps without requiring extra Node options, and we set appropriate security headers when rendering error pages.
### 📦 Module Development Improvements
For module authors, we've added the ability to augment Nitro types with `addTypeTemplate` ([#31079](https://github.com/nuxt/nuxt/pull/31079)):
```ts
// Inside your Nuxt module
export default defineNuxtModule({
setup(options, nuxt) {
addTypeTemplate({
filename: 'types/my-module.d.ts',
getContents: () => `
declare module 'nitropack' {
interface NitroRouteConfig {
myCustomOption?: boolean
}
}
`
}, { nitro: true })
}
})
```
### ⚙️ Nitro v2.11 Upgrade
We've upgraded to Nitro v2.11. There are so many improvements - more than I can cover in these brief release notes.
👉 Check out all the details in the [Nitro v2.11.0 release notes](https://github.com/nitrojs/nitro/releases/tag/v2.11.0).
### 📦 New `unjs` Major Versions
This release includes several major version upgrades from the unjs ecosystem, focused on performance and smaller bundle sizes through ESM-only distributions:
- unenv upgraded to v2 (full rewrite)
- db0 upgraded to v0.3 (ESM-only, native node:sql, improvements)
- ohash upgraded to v2 (ESM-only, native node:crypto support, much faster)
- untyped upgraded to v2 (ESM-only, smaller install size)
- unimport upgraded to v4 (improvements)
- c12 upgraded to v3 (ESM-only)
- pathe upgraded to v2 (ESM-only)
- cookie-es upgraded to v2 (ESM-only)
- esbuild upgraded to v0.25
- chokidar upgraded to v4
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
npx nuxi@latest upgrade --dedupe
```
This refreshes your lockfile and pulls in all the latest dependencies that Nuxt relies on, especially from the unjs ecosystem.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.15.4...v3.16.0)
### 🚀 Enhancements
- **nuxt:** Upgrade `@nuxt/devtools` to v2 ([#30889](https://github.com/nuxt/nuxt/pull/30889))
- **nuxt:** Granular debug options ([#30578](https://github.com/nuxt/nuxt/pull/30578))
- **nuxt:** Add type hints for `NuxtPage` ([#30704](https://github.com/nuxt/nuxt/pull/30704))
- **nuxt:** Support tracking changes to nuxt options by modules ([#30555](https://github.com/nuxt/nuxt/pull/30555))
- **nuxt:** Allow disabling auto-imported polyfills ([#30332](https://github.com/nuxt/nuxt/pull/30332))
- **schema:** Add runtime + internal type validation ([#30844](https://github.com/nuxt/nuxt/pull/30844))
- **kit,nuxt,schema:** Support experimental decorators syntax ([#27672](https://github.com/nuxt/nuxt/pull/27672))
- **kit,nuxt:** Allow multiple nuxts to run in one process ([#30510](https://github.com/nuxt/nuxt/pull/30510))
- **kit:** Add named layer aliases ([#30948](https://github.com/nuxt/nuxt/pull/30948))
- **kit,nuxt,vite:** `directoryToURL` to normalise paths ([#30986](https://github.com/nuxt/nuxt/pull/30986))
- **nuxt:** Allow forcing `start`/`set` in loading indicator ([#30989](https://github.com/nuxt/nuxt/pull/30989))
- **nuxt:** Allow specifying glob patterns for scanning `pages/` ([#31090](https://github.com/nuxt/nuxt/pull/31090))
- **nuxt:** Add types for default `NuxtLink` slot ([#31104](https://github.com/nuxt/nuxt/pull/31104))
- **nuxt:** Delayed/lazy hydration support ([#26468](https://github.com/nuxt/nuxt/pull/26468))
- **vite:** Add vite's modulepreload polyfill ([#31164](https://github.com/nuxt/nuxt/pull/31164))
- **nuxt:** Show source file when warning about undefined useAsyncData ([#31144](https://github.com/nuxt/nuxt/pull/31144))
- **kit,nuxt:** Augment nitro types with `addTypeTemplate` ([#31079](https://github.com/nuxt/nuxt/pull/31079))
- **kit,nuxt:** Resolve template imports from originating module ([#31175](https://github.com/nuxt/nuxt/pull/31175))
- **nuxt:** Use `oxc-parser` instead of esbuild + acorn ([#30066](https://github.com/nuxt/nuxt/pull/30066))
- **nuxt:** Upgrade to unhead v2 ([#31169](https://github.com/nuxt/nuxt/pull/31169))
- **nuxt:** Align nuxt error handling with nitro ([#31230](https://github.com/nuxt/nuxt/pull/31230))
### 🔥 Performance
- **nuxt:** Remove duplicated nitro alias resolution ([#31088](https://github.com/nuxt/nuxt/pull/31088))
- **kit:** Try non-subpath routes first to resolve nuxt modules ([#31037](https://github.com/nuxt/nuxt/pull/31037))
- **nuxt:** Migrate to use `exsolve` for module resolution ([#31124](https://github.com/nuxt/nuxt/pull/31124))
- **kit:** Skip extra module resolution step in `loadNuxt` ([#31176](https://github.com/nuxt/nuxt/pull/31176))
### 🩹 Fixes
- **nuxt:** Ensure `` `fallback` prop is typed ([#30832](https://github.com/nuxt/nuxt/pull/30832))
- **nuxt:** Assign slot to be rendered for client components ([#30768](https://github.com/nuxt/nuxt/pull/30768))
- **nuxt,vite:** Do not override vite import conditions ([#30887](https://github.com/nuxt/nuxt/pull/30887))
- **nuxt:** Prevent `keepalive` cache reset ([#30807](https://github.com/nuxt/nuxt/pull/30807))
- **nuxt:** Remove `div` wrapper in client-only pages ([#30425](https://github.com/nuxt/nuxt/pull/30425))
- **schema:** Update type import to `nitropack` ([aba75bd5a](https://github.com/nuxt/nuxt/commit/aba75bd5a))
- **vite:** Use resolveId from vite-node to resolve deps ([#30922](https://github.com/nuxt/nuxt/pull/30922))
- **schema:** Normalise additional experimental options ([63e0c342c](https://github.com/nuxt/nuxt/commit/63e0c342c))
- **nuxt:** Delete existing properties in app config HMR ([#30918](https://github.com/nuxt/nuxt/pull/30918))
- **schema:** Return `null` from resolve functions ([d68e8ce57](https://github.com/nuxt/nuxt/commit/d68e8ce57))
- **schema:** Check if `app.head.meta` values are undefined ([#30959](https://github.com/nuxt/nuxt/pull/30959))
- **nuxt:** Make `shared/` directories available within layers ([#30843](https://github.com/nuxt/nuxt/pull/30843))
- **kit:** Ensure nuxt is loaded from cwd rather than parent dir ([#30910](https://github.com/nuxt/nuxt/pull/30910))
- **ui-templates:** Remove extra `` when rendering dev errors ([9aab69ec4](https://github.com/nuxt/nuxt/commit/9aab69ec4))
- **nuxt:** Use tsx loader for jsx blocks as well ([#31014](https://github.com/nuxt/nuxt/pull/31014))
- Remove unimplemented `page:transition:start` type ([#31040](https://github.com/nuxt/nuxt/pull/31040))
- **kit:** Expose module dependency errors ([#31035](https://github.com/nuxt/nuxt/pull/31035))
- **nuxt:** Deprioritise layer css imports ([#31020](https://github.com/nuxt/nuxt/pull/31020))
- **nuxt:** Ensure `provide` / `inject` work in `setup` of `defineNuxtComponent` ([#30982](https://github.com/nuxt/nuxt/pull/30982))
- **nuxt:** Decode URI components in cache driver methods ([#30973](https://github.com/nuxt/nuxt/pull/30973))
- **nuxt:** Use `_` for NuxtIsland name on server pages ([#31072](https://github.com/nuxt/nuxt/pull/31072))
- **nuxt:** Use `ohash` to calculate legacy async data key without hash ([#31087](https://github.com/nuxt/nuxt/pull/31087))
- **nuxt,schema:** Resolve `shared` dir from config ([#31091](https://github.com/nuxt/nuxt/pull/31091))
- **kit,schema:** Set esbuild target for experimental decorators ([#31089](https://github.com/nuxt/nuxt/pull/31089))
- **nuxt:** Set `nuxt.options.pages` to detected configuration ([#31101](https://github.com/nuxt/nuxt/pull/31101))
- **nuxt:** Warn when `definePageMeta` does not receive an object ([#31156](https://github.com/nuxt/nuxt/pull/31156))
- **nuxt:** Fix nitro import statements for v2 ([151cf7d49](https://github.com/nuxt/nuxt/commit/151cf7d49))
- **nuxt:** Update path to `no-ssr` middleware handler ([a99c59fbd](https://github.com/nuxt/nuxt/commit/a99c59fbd))
- **nuxt:** Align type of custom `navigate` with `vue-router` ([7a1934509](https://github.com/nuxt/nuxt/commit/7a1934509))
- **nuxt:** Show error page on island page error ([#31081](https://github.com/nuxt/nuxt/pull/31081))
- **nuxt:** Do not render payloads if disabled, and correct regexp ([#31167](https://github.com/nuxt/nuxt/pull/31167))
- **nuxt:** Add backwards-compatible serialisation for `nuxt.options.pages` ([fa480e0a0](https://github.com/nuxt/nuxt/commit/fa480e0a0))
- **ui-templates:** Escape inline scripts correctly in ui templates ([39c2b0a2c](https://github.com/nuxt/nuxt/commit/39c2b0a2c))
- **nuxt:** Add back fallback nuxtlink type signature ([a8856de59](https://github.com/nuxt/nuxt/commit/a8856de59))
- **kit:** Provide default extensions in `resolveModule` ([6fb5c9c15](https://github.com/nuxt/nuxt/commit/6fb5c9c15))
- **nuxt:** Provide default extensions in `resolveTypePath` ([a0f9ddfe2](https://github.com/nuxt/nuxt/commit/a0f9ddfe2))
- **nuxt:** Strip query before generating payload url ([34ddc2d2f](https://github.com/nuxt/nuxt/commit/34ddc2d2f))
- **schema:** Resolve workspaceDir to closest git config ([7a2fbce01](https://github.com/nuxt/nuxt/commit/7a2fbce01))
- **kit:** Include declaration files when resolving `compilerOptions.paths` ([835e89404](https://github.com/nuxt/nuxt/commit/835e89404))
- **nuxt:** Consolidate head component context ([#31209](https://github.com/nuxt/nuxt/pull/31209))
- **nuxt:** Resolve shared externals to absolute paths ([#31227](https://github.com/nuxt/nuxt/pull/31227))
- **nuxt:** Skip deep merge in dev mode for prototype keys ([#31205](https://github.com/nuxt/nuxt/pull/31205))
- **schema:** Use `RawVueCompilerOptions` for unresolved `tsconfig` ([#31202](https://github.com/nuxt/nuxt/pull/31202))
- **nuxt:** Ensure externals are resolved first ([#31235](https://github.com/nuxt/nuxt/pull/31235))
- **nuxt:** Ensure we strip all chars in payload url ([4f067f601](https://github.com/nuxt/nuxt/commit/4f067f601))
- **nuxt:** Exempt nitro from import protections ([#31246](https://github.com/nuxt/nuxt/pull/31246))
- **nuxt:** Normalise error url to pathname ([87b69c9ae](https://github.com/nuxt/nuxt/commit/87b69c9ae))
- **nuxt:** Ensure head components are reactive ([#31248](https://github.com/nuxt/nuxt/pull/31248))
- **nuxt:** Preserve query/hash when calling `navigateTo` with replace ([#31244](https://github.com/nuxt/nuxt/pull/31244))
- **nuxt:** Apply ignore rules to nitro `devStorage` ([#31233](https://github.com/nuxt/nuxt/pull/31233))
- **nuxt:** Fall back to wasm if oxc native bindings are missing ([#31190](https://github.com/nuxt/nuxt/pull/31190))
- **nuxt:** Pass `useFetch` function name on server for warning ([#31213](https://github.com/nuxt/nuxt/pull/31213))
- **vite:** Prevent overriding server build chunks ([89a29e760](https://github.com/nuxt/nuxt/commit/89a29e760))
- **nuxt:** Strip query in `x-nitro-prerender` header ([2476cab9a](https://github.com/nuxt/nuxt/commit/2476cab9a))
### 💅 Refactors
- **nuxt:** Prefer logical assignment operators ([#31004](https://github.com/nuxt/nuxt/pull/31004))
- **nuxt:** Use `isEqual` from `ohash/utils` ([2e27cd30c](https://github.com/nuxt/nuxt/commit/2e27cd30c))
- **nuxt:** Update to `noScripts` route rule ([#31083](https://github.com/nuxt/nuxt/pull/31083))
- **nuxt:** Re-organize internal `runtime/nitro` files ([#31131](https://github.com/nuxt/nuxt/pull/31131))
- **nuxt:** Explicitly type internal request fetch ([54cb80319](https://github.com/nuxt/nuxt/commit/54cb80319))
- **nuxt:** Use relative imports ([1bce3dc3b](https://github.com/nuxt/nuxt/commit/1bce3dc3b))
- **nuxt:** Early return island response ([#31094](https://github.com/nuxt/nuxt/pull/31094))
### 📖 Documentation
- Tiny typo ([#30799](https://github.com/nuxt/nuxt/pull/30799))
- Fix typo ([#30817](https://github.com/nuxt/nuxt/pull/30817))
- Remove backslashes in `spaLoadingTemplate` example ([#30830](https://github.com/nuxt/nuxt/pull/30830))
- Update path to nuxt binary ([8992c4ea0](https://github.com/nuxt/nuxt/commit/8992c4ea0))
- Add nuxt lifecycle ([#30726](https://github.com/nuxt/nuxt/pull/30726))
- Add additional information about `NuxtPage` ([#30781](https://github.com/nuxt/nuxt/pull/30781))
- Improve `navigateTo` docs with clearer structure and examples ([#30876](https://github.com/nuxt/nuxt/pull/30876))
- Add auto import info about shared utils ([#30858](https://github.com/nuxt/nuxt/pull/30858))
- Fix typo and improve data fetching examples ([#30935](https://github.com/nuxt/nuxt/pull/30935))
- Clarify that local layers are scanned from `rootDir` ([27e356fe6](https://github.com/nuxt/nuxt/commit/27e356fe6))
- Fix typo ([#30963](https://github.com/nuxt/nuxt/pull/30963))
- Update links to unhead sources ([6c520ef74](https://github.com/nuxt/nuxt/commit/6c520ef74))
- Fix typo ([#30971](https://github.com/nuxt/nuxt/pull/30971))
- Add tips on how to override layers aliases ([#30970](https://github.com/nuxt/nuxt/pull/30970))
- Add description for `vue:setup` and `app:data:refresh` hooks ([#31001](https://github.com/nuxt/nuxt/pull/31001))
- Mention requirement to wrap middleware in `defineNuxtRouteMiddleware` ([#31005](https://github.com/nuxt/nuxt/pull/31005))
- Add `port` option to preview command ([#30999](https://github.com/nuxt/nuxt/pull/30999))
- Remove link to deleted nuxt 2 section ([#31077](https://github.com/nuxt/nuxt/pull/31077))
- Link to the scripts releases page ([#31095](https://github.com/nuxt/nuxt/pull/31095))
- Add `.nuxtrc` documentation ([#31093](https://github.com/nuxt/nuxt/pull/31093))
- Fix typo in example command ([#31112](https://github.com/nuxt/nuxt/pull/31112))
- Explain why headers not forwarded when using `$fetch` on the server ([#31114](https://github.com/nuxt/nuxt/pull/31114))
- Fix links to nitro directory structure ([5a696176d](https://github.com/nuxt/nuxt/commit/5a696176d))
- Update to use `create nuxt` command ([fe82af4c9](https://github.com/nuxt/nuxt/commit/fe82af4c9))
- Update getCachedData types ([#31208](https://github.com/nuxt/nuxt/pull/31208))
- Update code example for nightly release to default to `3x` ([a243f8fcf](https://github.com/nuxt/nuxt/commit/a243f8fcf))
- Clarify lifecycle behavior of `` during page changes ([#31116](https://github.com/nuxt/nuxt/pull/31116))
- Mention workaround for `typedPages` in unhoisted pnpm setups ([#31262](https://github.com/nuxt/nuxt/pull/31262))
### 📦 Build
- **nuxt:** Add subpath imports for type support ([8ef3fcc4d](https://github.com/nuxt/nuxt/commit/8ef3fcc4d))
### 🏡 Chore
- Remove second version of vitest ([bc9ac7349](https://github.com/nuxt/nuxt/commit/bc9ac7349))
- Bump bundle size ([c5e191165](https://github.com/nuxt/nuxt/commit/c5e191165))
- Add basic copilot instructions ([d47b830d3](https://github.com/nuxt/nuxt/commit/d47b830d3))
- Handle undefined author ([0161985c0](https://github.com/nuxt/nuxt/commit/0161985c0))
- Use logical or assignment ([#30992](https://github.com/nuxt/nuxt/pull/30992))
- Reorder options object ([11e6b8398](https://github.com/nuxt/nuxt/commit/11e6b8398))
- Lint ([86c960c6f](https://github.com/nuxt/nuxt/commit/86c960c6f))
- Fix broken lockfile ([05501d2c8](https://github.com/nuxt/nuxt/commit/05501d2c8))
- Add `errx` dependency ([566418177](https://github.com/nuxt/nuxt/commit/566418177))
- Add additional dummy url to ignore ([bc101e4ae](https://github.com/nuxt/nuxt/commit/bc101e4ae))
- Ignore internal resolution errors in nuxt types ([0d54dc3f4](https://github.com/nuxt/nuxt/commit/0d54dc3f4))
- Bump octokit patch versions ([a477065b4](https://github.com/nuxt/nuxt/commit/a477065b4))
- Bump `@nuxtjs/mdc` typechecking dep ([f23683b26](https://github.com/nuxt/nuxt/commit/f23683b26))
- Ignore `nitro/renderer` templates ([b29c0e86b](https://github.com/nuxt/nuxt/commit/b29c0e86b))
### ✅ Tests
- Add benchmarks for dev server initial build ([#30742](https://github.com/nuxt/nuxt/pull/30742))
- Exclude urls from lychee crawler used in test suite ([8e2d9a640](https://github.com/nuxt/nuxt/commit/8e2d9a640))
- Prepare environment to ensure more reproducible dev tests ([bc89ef867](https://github.com/nuxt/nuxt/commit/bc89ef867))
- Update unit test ([5a71ef8ac](https://github.com/nuxt/nuxt/commit/5a71ef8ac))
- Add major version to unit test ([676447239](https://github.com/nuxt/nuxt/commit/676447239))
- Slightly improve coverage ([d992c0da9](https://github.com/nuxt/nuxt/commit/d992c0da9))
- Bump timeout for route hmr ([cbe38cf52](https://github.com/nuxt/nuxt/commit/cbe38cf52))
- Update unit test snapshot for jsx ([4910959b9](https://github.com/nuxt/nuxt/commit/4910959b9))
- Disable codspeed outside of ci ([71de708a0](https://github.com/nuxt/nuxt/commit/71de708a0))
- Add some more stability in hmr tests ([9a9fcdab5](https://github.com/nuxt/nuxt/commit/9a9fcdab5))
- Skip testing spa-preloader in dev ([6cf97bfe5](https://github.com/nuxt/nuxt/commit/6cf97bfe5))
- Fix time-based hydration test ([da3b39d67](https://github.com/nuxt/nuxt/commit/da3b39d67))
- Simplify further ([ad306f472](https://github.com/nuxt/nuxt/commit/ad306f472))
- Filter out dev server logs 🙈 ([ee040eea3](https://github.com/nuxt/nuxt/commit/ee040eea3))
- Update unit test snapshot ([97ec3143a](https://github.com/nuxt/nuxt/commit/97ec3143a))
- Provide nuxt extensions in unit test ([358729e96](https://github.com/nuxt/nuxt/commit/358729e96))
- Add benchmark for vite client build ([#31118](https://github.com/nuxt/nuxt/pull/31118))
- Update build benchmark ([82ca08f93](https://github.com/nuxt/nuxt/commit/82ca08f93))
- Ensure dev tests have separate buildDirs ([d7623f884](https://github.com/nuxt/nuxt/commit/d7623f884))
- Update nitro type import ([8f61d0090](https://github.com/nuxt/nuxt/commit/8f61d0090))
- Update import to `#internal/nitro/app` ([a1b855cc5](https://github.com/nuxt/nuxt/commit/a1b855cc5))
- Try to improve dev test stability ([#31218](https://github.com/nuxt/nuxt/pull/31218))
- Migrate hmr test to use playwright runner ([#31241](https://github.com/nuxt/nuxt/pull/31241))
### ❤️ Contributors
- Anoesj Sadraee (@Anoesj)
- Daniel Roe (@danielroe)
- John Tanzer (@moshetanzer)
- Connor Pearson (@cjpearson)
- Connor Roberts (@murshex)
- Harlan Wilton (@harlan-zw)
- Alex Liu (@Mini-ghost)
- Kevin Deng 三咲智子 (@sxzz)
- xjccc (@xjccc)
- Julien Huang (@huang-julien)
- Michael Brevard (@GalacticHypernova)
- Maik Kowol (@94726)
- Anthony Fu (@antfu)
- Bobbie Goede (@BobbieGoede)
- Clayton Chew (@claytonchew)
- awfulness (@awfulness)
- Sébastien Chopin (@atinux)
- Saeid Zareie (@Saeid-Za)
- Vahagn Zaqaryan (@Vahagn-Zaqaryan)
- Idorenyin Udoh (@idorenyinudoh)
- Jonas Thelemann (@dargmuesli)
- Ryota Watanabe (@wattanx)
- Horu (@HigherOrderLogic)
- Nolhan (@Nonolanlan1007)
- Typed SIGTERM (@typed-sigterm)
- Hans Tu (@ChiaHanTu)
- Damian Głowala (@DamianGlowala)
- David Marr (@marr)
- Camille Coutens (@Kamsou)
- Charlie ✨ (@CharleeWa)
- Hussain Panahy (@HP8585)
- @beer (@iiio2)
v3.15.4 (2025-01-29)
> 3.15.4 is the next patch release.
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
npx nuxi@latest upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.15.3...v3.15.4)
### 🩹 Fixes
- **nuxt:** Improve error logging when parsing with `acorn` ([#30754](https://github.com/nuxt/nuxt/pull/30754))
- **nuxt:** Clear island uid before saving into the payload ([#30767](https://github.com/nuxt/nuxt/pull/30767))
- **kit:** Load `@nuxt/schema` from `nuxt` package dir ([#30774](https://github.com/nuxt/nuxt/pull/30774))
- **nuxt:** Allow restarting nuxt on paths outside `srcDir` ([#30771](https://github.com/nuxt/nuxt/pull/30771))
- **nuxt:** Don't warn about calling `useRoute` in SFC setup ([#30788](https://github.com/nuxt/nuxt/pull/30788))
- **webpack:** Disallow cross-site requests in no-cors mode ([#30757](https://github.com/nuxt/nuxt/pull/30757))
- **vite:** Restore `externality` for dev server externals ([#30802](https://github.com/nuxt/nuxt/pull/30802))
### 💅 Refactors
- **vite:** Use new rollup `chunk.names` for asset names ([#30780](https://github.com/nuxt/nuxt/pull/30780))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- Peter Radko (@Gwynerva)
- Lansi (@lansi951)
- Julien Huang (@huang-julien)
- Norbiros (@Norbiros)
v3.15.3 (2025-01-24)
> 3.15.3 is the next regularly scheduled patch release.
## 👀 Highlights
### CORS configuration for dev server
Alongside a range of improvements, we've also shipped a significant fix to impose [CORS origin restrictions on the dev server](https://github.com/nuxt/nuxt/commit/406db5b4d). This applies to your Vite or Webpack/Rspack dev middleware only.
This is a significant/breaking change we would not normally ship in a patch but it is a security fix (see https://github.com/nuxt/nuxt/security/advisories/GHSA-4gf7-ff8x-hq99 and https://github.com/nuxt/nuxt/security/advisories/GHSA-2452-6xj8-jh47) and we urge you to update ASAP.
You can configure the allowed origins and other CORS options via the `devServer.cors` options in your `nuxt.config`, which may be relevant if you are developing with a custom hostname:
```ts
export default defineNuxtConfig({
devServer: {
cors: {
origin: ['https://custom-origin.com'],
},
},
})
```
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
npx nuxi@latest upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.15.2...v3.15.3)
### 🔥 Performance
- **kit,nuxt:** Don't resolve paths from local layers/modules ([#30650](https://github.com/nuxt/nuxt/pull/30650))
- **nuxt:** Reduce number of `mkdirSync` calls ([#30651](https://github.com/nuxt/nuxt/pull/30651))
- **nuxt:** Reduce unnecessary template updating ([#30684](https://github.com/nuxt/nuxt/pull/30684))
- **kit:** Reduce duplication between `findPath` and `resolvePath` ([#30682](https://github.com/nuxt/nuxt/pull/30682))
- **kit:** Run components compat check synchronously ([#30685](https://github.com/nuxt/nuxt/pull/30685))
- **nuxt:** Early return from annotation for non-object syntax plugins ([#30683](https://github.com/nuxt/nuxt/pull/30683))
- **nuxt:** Enable `Transition` component only on client side ([#30720](https://github.com/nuxt/nuxt/pull/30720))
### 🩹 Fixes
- **vite:** Override previous `#app-manifest` alias ([#30618](https://github.com/nuxt/nuxt/pull/30618))
- **kit,nuxt,schema,vite:** Improve watching behaviour ([#30620](https://github.com/nuxt/nuxt/pull/30620))
- **nuxt:** Fall back to `plugin.src` for variable name generation ([#30649](https://github.com/nuxt/nuxt/pull/30649))
- **schema:** Allow overriding `dev`/`test` environment value ([#30667](https://github.com/nuxt/nuxt/pull/30667))
- **vite:** Drop unneeded call to invalidate module ([d2a95c542](https://github.com/nuxt/nuxt/commit/d2a95c542))
- **vite:** Add back `invalidateModule` call ([9bd71e498](https://github.com/nuxt/nuxt/commit/9bd71e498))
- **nuxt:** Do not warn about `[[` optional dynamic params ([#30619](https://github.com/nuxt/nuxt/pull/30619))
- **vite:** Inline shared folder in dev mode ([#30690](https://github.com/nuxt/nuxt/pull/30690))
- **nuxt:** Deep clone extracted page meta ([#30717](https://github.com/nuxt/nuxt/pull/30717))
- **vite,webpack:** Restrict access via cors to local origins + allow configuration via `devServer.cors` ([406db5b4d](https://github.com/nuxt/nuxt/commit/406db5b4d))
### 💅 Refactors
- **vite:** Drop `externality` and use vite internal config ([#30634](https://github.com/nuxt/nuxt/pull/30634))
### 📖 Documentation
- Add link to custom `useFetch` example ([#30629](https://github.com/nuxt/nuxt/pull/30629))
- Fix example command ([#30628](https://github.com/nuxt/nuxt/pull/30628))
- Fix links to `nuxi` source code ([4fabe0025](https://github.com/nuxt/nuxt/commit/4fabe0025))
- Add description for prefetch and other details of `NuxtLink` ([#30614](https://github.com/nuxt/nuxt/pull/30614))
- Update nuxt/content example ([542987627](https://github.com/nuxt/nuxt/commit/542987627))
- Adjust examples, type and description for `addRouteMiddleware` ([#30656](https://github.com/nuxt/nuxt/pull/30656))
- Explain how to use `ClientOnly` with `onMounted` hook ([#30670](https://github.com/nuxt/nuxt/pull/30670))
- Update links to unhead source ([eb5344b43](https://github.com/nuxt/nuxt/commit/eb5344b43))
- Add more context about `navigation` mode in `callOnce` composable ([#30612](https://github.com/nuxt/nuxt/pull/30612))
- Add example on how to disable default routes for ssg ([#30729](https://github.com/nuxt/nuxt/pull/30729))
### 📦 Build
- **schema:** Use new `inlineDependencies` option ([01adefcec](https://github.com/nuxt/nuxt/commit/01adefcec))
### 🏡 Chore
- **kit:** Explicitly inline `lodash-es` ([0c01273f5](https://github.com/nuxt/nuxt/commit/0c01273f5))
- Add debug timing jiti/unbuild plugins ([#30648](https://github.com/nuxt/nuxt/pull/30648))
- Do not clobber global tracker objects ([df8554331](https://github.com/nuxt/nuxt/commit/df8554331))
- Remove stray console log ([47c40f310](https://github.com/nuxt/nuxt/commit/47c40f310))
- Improve debugging plugins ([492b1ec65](https://github.com/nuxt/nuxt/commit/492b1ec65))
- Write metrics to disk for better diffing ([c5c6b8105](https://github.com/nuxt/nuxt/commit/c5c6b8105))
- Lint ([86aff854c](https://github.com/nuxt/nuxt/commit/86aff854c))
### 🤖 CI
- Run bundle size assertion outside of matrix ([#30688](https://github.com/nuxt/nuxt/pull/30688))
- Reenable nuxt benchmarking ([#30711](https://github.com/nuxt/nuxt/pull/30711))
### ❤️ Contributors
- Alex Liu (@Mini-ghost)
- Daniel Roe (@danielroe)
- Alan Schio (@schirrel)
- xjccc (@xjccc)
- Saeid Zareie (@Saeid-Za)
- Zakhar Shymanchyk (@zshimanchik)
- Arturs Jansons (@iegik)
- Maxime Pauvert (@maximepvrt)
v3.15.2 (2025-01-15)
> 3.15.2 is the next regularly scheduled patch release.
## 👀 Highlights
### 🔥 Startup performance improvements
It is worth noting that this release includes some pretty significant performance improvements which you should notice particularly in the startup time. In my tests in the nuxt monorepo,
| fixture | time to vite build complete (v3.15.1) | time to vite build complete (v3.15.2) |
| - | - | - |
| minimal | 850ms | 710ms |
| everything bagel | 3,021ms | 1,690ms |
There's more improvement to do here but hopefully these are good numbers!
### 📦 CLI refactor
To improve performance within Nuxt projects, we've published a new `@nuxt/cli` distribution of `nuxi`, which is used under-the-hood in `nuxt` (see [issue](https://github.com/nuxt/cli/issues/648)). This should behave exactly the same and nothing needs to be updated in your projects (for example, you will continue to use the `nuxi` or `nuxt` commands). The only significant change is that it no longer inlines dependencies. Feedback is welcome 🙏
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
npx nuxi@latest upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.15.1...v3.15.2)
### 🔥 Performance
- **nuxt:** Remove code duplication in client-only ([#30460](https://github.com/nuxt/nuxt/pull/30460))
- **nuxt:** Use lighter `@nuxt/cli` dependency ([#30526](https://github.com/nuxt/nuxt/pull/30526))
- **kit:** Remove iterations when resolving module path ([#30562](https://github.com/nuxt/nuxt/pull/30562))
- **nuxt:** Avoid checking fs for existence of scanned pages ([#30581](https://github.com/nuxt/nuxt/pull/30581))
- **nuxt:** Defer version/config warnings to after build ([#30567](https://github.com/nuxt/nuxt/pull/30567))
### 🩹 Fixes
- **nuxt:** Collect all identifiers before extracting page metadata ([#30478](https://github.com/nuxt/nuxt/pull/30478))
- **nuxt:** Don't hoist identifiers declared locally in `definePageMeta` when extracting page metadata ([#30490](https://github.com/nuxt/nuxt/pull/30490))
- **kit:** Reorder `#build` to the end of `tsConfig` paths ([#30520](https://github.com/nuxt/nuxt/pull/30520))
- **nuxt:** Use `fullPath` instead of empty string in router hmr ([#30500](https://github.com/nuxt/nuxt/pull/30500))
- Relax nuxt version constraints to current ([23b968289](https://github.com/nuxt/nuxt/commit/23b968289))
- **nuxt:** Add import protection for `@nuxt/cli` ([618bbc6da](https://github.com/nuxt/nuxt/commit/618bbc6da))
- **kit:** Fully resolve plugin paths when normalising them ([#30540](https://github.com/nuxt/nuxt/pull/30540))
- **nuxt:** Call `page:loading:end` only once with nested pages ([#29009](https://github.com/nuxt/nuxt/pull/29009))
- **nuxt:** Warn about ignored char while parsing route segment ([#30396](https://github.com/nuxt/nuxt/pull/30396))
- **nuxt:** Allow url-specific chars in vfs ([#30584](https://github.com/nuxt/nuxt/pull/30584))
- **nuxt:** Do not warn about invalid characters in route groups/catchalls ([0249c74bc](https://github.com/nuxt/nuxt/commit/0249c74bc))
- **vite:** Provide fallback alias for `#app-manifest` ([#30587](https://github.com/nuxt/nuxt/pull/30587))
- **nuxt:** Avoid invoking `shouldPrefetch` on the server side ([#30591](https://github.com/nuxt/nuxt/pull/30591))
- **nuxt:** Decode id before resolving relative imports ([#30599](https://github.com/nuxt/nuxt/pull/30599))
### 💅 Refactors
- **kit,nuxt,webpack:** Reduce reassignments ([#30589](https://github.com/nuxt/nuxt/pull/30589))
### 📖 Documentation
- Document `--dev` option for the module command ([#30477](https://github.com/nuxt/nuxt/pull/30477))
- Document the add layer command ([#30476](https://github.com/nuxt/nuxt/pull/30476))
- Update v4 release date ([#30514](https://github.com/nuxt/nuxt/pull/30514))
- Ensure correct type for `url` in `useFetch` ([#30531](https://github.com/nuxt/nuxt/pull/30531))
- Update link to `@nuxt/module-builder` source ([509cf4a5c](https://github.com/nuxt/nuxt/commit/509cf4a5c))
- Add `status` detail and enhance `getCachedData` readability ([#30536](https://github.com/nuxt/nuxt/pull/30536))
- Update hash link to correct heading ([#30543](https://github.com/nuxt/nuxt/pull/30543))
- Update links to unhead source ([fef3a59bb](https://github.com/nuxt/nuxt/commit/fef3a59bb))
- Adjust example and additional instructions of `useNuxtData` ([#30570](https://github.com/nuxt/nuxt/pull/30570))
- Resolve many twoslash errors ([#30573](https://github.com/nuxt/nuxt/pull/30573))
- Add context for `useAsyncData` side effects ([#30479](https://github.com/nuxt/nuxt/pull/30479))
- Update examples to use function declarations for clarity ([#30588](https://github.com/nuxt/nuxt/pull/30588))
### 🏡 Chore
- Control dependency import into `nuxt/app` ([1adf3e31f](https://github.com/nuxt/nuxt/commit/1adf3e31f))
- Ignore automated renovate node engines updates ([6895993fb](https://github.com/nuxt/nuxt/commit/6895993fb))
### 🤖 CI
- Don't block release on fixtures + add pkg.pr.new ([#30548](https://github.com/nuxt/nuxt/pull/30548))
- Remove concurrency group from release-pr job ([8ac54ff10](https://github.com/nuxt/nuxt/commit/8ac54ff10))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- Alex Liu (@Mini-ghost)
- Anthony Fu (@antfu)
- Camille Coutens (@Kamsou)
- Julien Huang (@huang-julien)
- Peter Buglavecz (@buglavecz)
- ikxin (@ikxin)
- Guspan Tanadi (@guspan-tanadi)
- Vuk Marjanovic (@vmrjnvc)
- Saeid Zareie (@Saeid-Za)
- Matej Černý (@cernymatej)
- Clément Ollivier (@clemcode)
v3.15.1 (2025-01-05)
> 3.15.1 is the next regularly scheduled patch release.
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
npx nuxi@latest upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.15.0...v3.15.1)
### 🔥 Performance
- **nuxt:** Skip experimental async context transform in client build ([#30360](https://github.com/nuxt/nuxt/pull/30360))
- **schema:** Drop unneeded type-only schema dependencies ([#30411](https://github.com/nuxt/nuxt/pull/30411))
- **rspack,webpack:** Drop `lodash-es` dependency ([#30409](https://github.com/nuxt/nuxt/pull/30409))
- **nuxt:** Drop `pathe` browser dep for deep server components ([#30456](https://github.com/nuxt/nuxt/pull/30456))
### 🩹 Fixes
- **nuxt:** Update module path for defaults ([#30371](https://github.com/nuxt/nuxt/pull/30371))
- **nuxt:** Ignore non-reference identifiers when extracting page metadata ([#30381](https://github.com/nuxt/nuxt/pull/30381))
- **nuxt:** Pass `nuxt` instance to `resolvePagesRoutes` ([e4a372e12](https://github.com/nuxt/nuxt/commit/e4a372e12))
- **schema:** Support pfx certificate for dev server ([#30412](https://github.com/nuxt/nuxt/pull/30412))
- **nuxt:** Use node `location` instead of `range` for route meta property extraction ([#30447](https://github.com/nuxt/nuxt/pull/30447))
- **schema:** Override `vueCompilerOptions.plugins` type ([#30454](https://github.com/nuxt/nuxt/pull/30454))
- **nuxt:** Respect `baseURL` when ignoring prerendered manifest ([#30446](https://github.com/nuxt/nuxt/pull/30446))
- **nuxt:** Respect `router.options` when hmring routes ([#30455](https://github.com/nuxt/nuxt/pull/30455))
### 💅 Refactors
- **nuxt:** Use `consola` with `nuxt` tag instead of console ([#30408](https://github.com/nuxt/nuxt/pull/30408))
### 📖 Documentation
- Update references to `lodash` and recommend `es-toolkit` ([8e2ca5bdc](https://github.com/nuxt/nuxt/commit/8e2ca5bdc))
- Add warning about prerendering ([#30437](https://github.com/nuxt/nuxt/pull/30437))
### 🏡 Chore
- Add configuration for JetBrains IDEs ([#30380](https://github.com/nuxt/nuxt/pull/30380))
- Update lockfile ([db65a703b](https://github.com/nuxt/nuxt/commit/db65a703b))
- Dedupe lockfile + bump nanoid ([c5eb6a81d](https://github.com/nuxt/nuxt/commit/c5eb6a81d))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- Anders Bootsmann Larsen (@bootsmann1995)
- Alexander Lichter (@TheAlexLichter)
- Matej Černý (@cernymatej)
- Connor Roberts (@murshex)
- Julien Huang (@huang-julien)
v3.15.0 (2024-12-24)
## 👀 Highlights
### ❄️ Snowfall!
Happy holidays! You'll notice when you start Nuxt that (if you're in the Northern Hemisphere) there's some snow on the loading screen ([#29871](https://github.com/nuxt/nuxt/pull/29871)).
### ⚡️ Vite 6 included
Nuxt v3.15 includes [Vite 6](https://vite.dev/blog/announcing-vite6) for the first time. Although this is a major version, we expect that this won't be a breaking change for Nuxt users (see full [migration guide](https://vite.dev/guide/migration.html)). However, please take care if you have dependencies that rely on a particular Vite version.
One of the most significant changes with Vite 6 is the new Environment API, which we hope to use in conjunction with Nitro to improve the server dev environment. Watch this space!
You can read the full list of changes in the [Vite 6 changelog](https://github.com/vitejs/vite/blob/v6.0.0/packages/vite/CHANGELOG.md).
### 🪵 Chromium devtools improvements
We talk a lot about the Nuxt DevTools, but v3.15 ships with better integration in dev mode for Chromium-based browser devtools.
We now use the [Chrome DevTools extensibility API](https://developer.chrome.com/docs/devtools/performance/extension) to add support for printing nuxt hook timings in the browser devtools performance panel.

### 🗺️ Navigation mode for `callOnce`
`callOnce` is a built-in Nuxt composable for running code only once. For example, if the code runs on the server it won't run again on the client. But sometimes you do want code to run on _every navigation_ - just avoid the initial server/client double load. For this, there's a new `mode: 'navigation'` option that will run the code only once _per navigation_. (See [#30260](https://github.com/nuxt/nuxt/pull/30260) for more info.)
```ts
await callOnce(() => counter.value++, { mode: 'navigation' })
```
### 🥵 HMR for templates, pages + page metadata
We now implement hot module reloading for Nuxt's virtual files (like routes, plugins, generated files) as well as for the content of page metadata (within a `definePageMeta` macro) ([#30113](https://github.com/nuxt/nuxt/pull/30113)).
This should mean you have a faster experience in development, as well as not needing to reload the page when making changes to your routes.
### 📋 Page meta enhancements
We now support extracting extra page meta keys (likely used by module authors) via `experimental.extraPageMetaExtractionKeys` ([#30015](https://github.com/nuxt/nuxt/pull/30015)). This enables module authors to use this information at build time, in the `pages:resolved` hook.
We also now support local functions in `definePageMeta` ([#30241](https://github.com/nuxt/nuxt/pull/30241)). This means you can do something like this:
```ts
function validateIdParam(route) {
return !!(route.params.id && !isNaN(Number(route.params.id)))
}
definePageMeta({
validate: validateIdParam,
})
```
### 🔥 Performance improvements
We now preload the app manifest in the browser if it will be used when hydrating the app ([#30017](https://github.com/nuxt/nuxt/pull/30017)).
We'll also tree shake vue-router's hash mode history out of your bundle if we can - specifically, if you haven't customised your `app/router.options.ts` ([#30297](https://github.com/nuxt/nuxt/pull/30297)).
### 🐣 v4 updates
A few more changes shipped for the new defaults for v4, including only inlining styles by default for Vue components ([#30305](https://github.com/nuxt/nuxt/pull/30305)).
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
npx nuxi@latest upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.14.1592...v3.15.0)
### 🚀 Enhancements
- **deps:** Update dependency vite to v6 (3.x) ([#30044](https://github.com/nuxt/nuxt/pull/30044))
- **kit:** Allow module default options to be async ([#29980](https://github.com/nuxt/nuxt/pull/29980))
- **nuxt:** Add new types to vue preset ([#29819](https://github.com/nuxt/nuxt/pull/29819))
- **nuxt:** Experimental `extraPageMetaExtractionKeys` ([#30015](https://github.com/nuxt/nuxt/pull/30015))
- **nuxt,schema:** Allow setting serialisable vue app config ([#28873](https://github.com/nuxt/nuxt/pull/28873))
- **nuxt:** Print nuxt hook timings in browser devtools ([#29922](https://github.com/nuxt/nuxt/pull/29922))
- **nuxt:** Support vue directive auto-imports within unimport ([#29818](https://github.com/nuxt/nuxt/pull/29818))
- **schema:** Add snow effect on loading screen in winter ([#29871](https://github.com/nuxt/nuxt/pull/29871))
- **nuxt:** Support local functions in `definePageMeta` ([#30241](https://github.com/nuxt/nuxt/pull/30241))
- **nuxt:** Add `mode: 'navigation'` to `callOnce` ([#30260](https://github.com/nuxt/nuxt/pull/30260))
### 🔥 Performance
- **nuxt:** Preload app manifest ([#30017](https://github.com/nuxt/nuxt/pull/30017))
- **nuxt:** Use static `hashMode` option ([#30297](https://github.com/nuxt/nuxt/pull/30297))
- **vite:** Use vite to clear screen ([#30315](https://github.com/nuxt/nuxt/pull/30315))
- **schema:** Only inline styles for vue components ([#30305](https://github.com/nuxt/nuxt/pull/30305))
- **nuxt:** Remove useId from composable key plugin ([#30328](https://github.com/nuxt/nuxt/pull/30328))
### 🩹 Fixes
- **nuxt:** Check if nuxt link observer is null ([#30038](https://github.com/nuxt/nuxt/pull/30038))
- **nuxt:** Unref the default value of asyncData when clearing ([#30041](https://github.com/nuxt/nuxt/pull/30041))
- **kit:** Re-export `addServerTemplate` ([a02af2348](https://github.com/nuxt/nuxt/commit/a02af2348))
- Remove unused dependencies and tidy project ([#30043](https://github.com/nuxt/nuxt/pull/30043))
- **vite:** Add back some dev-bundler dependencies ([976024f16](https://github.com/nuxt/nuxt/commit/976024f16))
- **nuxt:** Do not persist `extraExtractionKeys` on runtime `route.meta` ([ae9f42f4a](https://github.com/nuxt/nuxt/commit/ae9f42f4a))
- **nuxt:** Allow array/object `style` value for head components ([#29999](https://github.com/nuxt/nuxt/pull/29999))
- **nuxt:** Tidy up remnants of previous `useId` implementation ([40f437d25](https://github.com/nuxt/nuxt/commit/40f437d25))
- **kit,nuxt:** Provide `buildDir` to `normalizeTemplate` ([#30115](https://github.com/nuxt/nuxt/pull/30115))
- **kit:** Add better logging for non-resolved modules ([#30116](https://github.com/nuxt/nuxt/pull/30116))
- **nuxt:** Correct return type of `useRequestFetch` ([#30117](https://github.com/nuxt/nuxt/pull/30117))
- **nuxt,vite:** Hmr for templates, pages + page metadata ([#30113](https://github.com/nuxt/nuxt/pull/30113))
- **nuxt:** Use `nitropack` rather than `nitro` import ([2d5b53b23](https://github.com/nuxt/nuxt/commit/2d5b53b23))
- **kit:** Use resolved module paths for transpile + modulesDir ([#30136](https://github.com/nuxt/nuxt/pull/30136))
- Update `engines.node` to match dependencies ([#30139](https://github.com/nuxt/nuxt/pull/30139))
- **schema:** Allow `routerOptions.history` to return null ([#30192](https://github.com/nuxt/nuxt/pull/30192))
- **nuxt:** Render client page directly when not hydrating ([#30061](https://github.com/nuxt/nuxt/pull/30061))
- **nuxt:** Use `useId` for island client component teleport id ([#30151](https://github.com/nuxt/nuxt/pull/30151))
- **nuxt:** De-default async layout components ([#30203](https://github.com/nuxt/nuxt/pull/30203))
- **nuxt:** Correct types for `nuxt` and `nuxt/app` ([#30148](https://github.com/nuxt/nuxt/pull/30148))
- **nuxt,schema:** Allow showing spa loader til after hydration ([#29776](https://github.com/nuxt/nuxt/pull/29776))
- **nuxt:** Remove whitespace around spa loading template ([070bd103c](https://github.com/nuxt/nuxt/commit/070bd103c))
- **nuxt:** Hoist environment types ([#30230](https://github.com/nuxt/nuxt/pull/30230))
- **schema:** Hoist nitro runtime types ([73761dade](https://github.com/nuxt/nuxt/commit/73761dade))
- **nuxt:** Ensure `getRouteRules` works with nitro signature ([#30277](https://github.com/nuxt/nuxt/pull/30277))
- **nuxt:** Respect `replace` in middleware with `navigateTo` ([#30283](https://github.com/nuxt/nuxt/pull/30283))
- **nuxt:** Update import paths for `nitropack` ([f220314a5](https://github.com/nuxt/nuxt/commit/f220314a5))
- **nuxt:** Don't use `` for links starting with `#` ([#30190](https://github.com/nuxt/nuxt/pull/30190))
- **vite:** Ignore optimising `#app-manifest` ([ec613e533](https://github.com/nuxt/nuxt/commit/ec613e533))
- **nuxt:** Use `useId` for `client-fallback` component uid ([#30314](https://github.com/nuxt/nuxt/pull/30314))
- **schema:** Gate inline style change behind v4 check ([ceac86e34](https://github.com/nuxt/nuxt/commit/ceac86e34))
- **nuxt:** Do not resolve deep imports for `@vitest/` ([4171a1076](https://github.com/nuxt/nuxt/commit/4171a1076))
- **kit:** Initialize tsconfig paths in `addTemplate` if undefined ([#30348](https://github.com/nuxt/nuxt/pull/30348))
- **nuxt:** Treat client useAsyncData calls as async boundaries ([#30343](https://github.com/nuxt/nuxt/pull/30343))
- **nuxt:** Initialise `import.meta.hot.data` ([b1cf5781d](https://github.com/nuxt/nuxt/commit/b1cf5781d))
### 💅 Refactors
- Move `composable-keys` plugin into nuxt core ([#30029](https://github.com/nuxt/nuxt/pull/30029))
- **nuxt:** Simplify and improve core plugins that parse ast ([#30088](https://github.com/nuxt/nuxt/pull/30088))
- **nuxt:** Prefix all core modules with `nuxt:` ([#30028](https://github.com/nuxt/nuxt/pull/30028))
### 📖 Documentation
- Remove extra new line in frontmatter ([#30031](https://github.com/nuxt/nuxt/pull/30031))
- Text capitalization for titles ([#30054](https://github.com/nuxt/nuxt/pull/30054))
- Mention that type checking can happen in dev ([#30012](https://github.com/nuxt/nuxt/pull/30012))
- Fix typos in punctuation ([#30006](https://github.com/nuxt/nuxt/pull/30006))
- Remove duplicate information about preprocessor variables ([#30002](https://github.com/nuxt/nuxt/pull/30002))
- Format text case for consistency ([#30073](https://github.com/nuxt/nuxt/pull/30073))
- Add a section about `event.waitUntil` ([#29583](https://github.com/nuxt/nuxt/pull/29583))
- Improve wording ([#30106](https://github.com/nuxt/nuxt/pull/30106))
- Update configuration files format ([#30087](https://github.com/nuxt/nuxt/pull/30087))
- Update links to `vite.dev` ([#30111](https://github.com/nuxt/nuxt/pull/30111))
- Fix incorrect vite docs link ([#30112](https://github.com/nuxt/nuxt/pull/30112))
- Add note about using bun runtime ([#30019](https://github.com/nuxt/nuxt/pull/30019))
- Add giget limitation in nuxt layers documentation ([#30122](https://github.com/nuxt/nuxt/pull/30122))
- Correct vite link ([#30135](https://github.com/nuxt/nuxt/pull/30135))
- Add `nuxi upgrade` channel flag ([#30184](https://github.com/nuxt/nuxt/pull/30184))
- Add note about awaiting `useLazyFetch` ([#30171](https://github.com/nuxt/nuxt/pull/30171))
- Add missing comma in upgrade doc code sample ([#30189](https://github.com/nuxt/nuxt/pull/30189))
- Added options and option definitions for sourcemap ([#30201](https://github.com/nuxt/nuxt/pull/30201))
- Add shared directory documentation ([#29816](https://github.com/nuxt/nuxt/pull/29816))
- Document `vite.css.preprocessorMaxWorkers` ([eb1ba017c](https://github.com/nuxt/nuxt/commit/eb1ba017c))
- Handle zero-length string ([cf74b4c98](https://github.com/nuxt/nuxt/commit/cf74b4c98))
- Update nitro links + fix link checking ([#30228](https://github.com/nuxt/nuxt/pull/30228))
- Add a note about `compatibilityVersion` feature flag ([#30274](https://github.com/nuxt/nuxt/pull/30274))
- Update auto-imports to advertise the scan feature ([#30292](https://github.com/nuxt/nuxt/pull/30292))
- Update `nuxi` command pages ([#30199](https://github.com/nuxt/nuxt/pull/30199))
- Update migration documentation for `inlineStyles` ([2660bffbc](https://github.com/nuxt/nuxt/commit/2660bffbc))
- Add bluesky link ([#30322](https://github.com/nuxt/nuxt/pull/30322))
- Add recipe for session and authentication ([#27287](https://github.com/nuxt/nuxt/pull/27287))
- Fix filename for prerendering page ([#30333](https://github.com/nuxt/nuxt/pull/30333))
- Add spacing ([#30331](https://github.com/nuxt/nuxt/pull/30331))
### 🏡 Chore
- Ignore typescript update for now ([10f08011c](https://github.com/nuxt/nuxt/commit/10f08011c))
- Refresh lockfile ([2cdd04c62](https://github.com/nuxt/nuxt/commit/2cdd04c62))
- Don't ignore typescript, but upgrade it separately ([149477467](https://github.com/nuxt/nuxt/commit/149477467))
- Pin `unimport` ([7ee455969](https://github.com/nuxt/nuxt/commit/7ee455969))
- Upgrade unimport separately ([dcf8bda04](https://github.com/nuxt/nuxt/commit/dcf8bda04))
- Add `installed-check` dependency ([0e84cb9a4](https://github.com/nuxt/nuxt/commit/0e84cb9a4))
- Remove unimport from isolation ([9d7f70ec0](https://github.com/nuxt/nuxt/commit/9d7f70ec0))
- Migrate renovate config ([#30214](https://github.com/nuxt/nuxt/pull/30214))
- Update bundle size snapshot ([b88ad0765](https://github.com/nuxt/nuxt/commit/b88ad0765))
- Downgrade `engines.node` to reflect only deps ([d3d276919](https://github.com/nuxt/nuxt/commit/d3d276919))
- Remove (unused) `rimraf` ([cf9d82c5a](https://github.com/nuxt/nuxt/commit/cf9d82c5a))
- Remove outdated comment ([#30324](https://github.com/nuxt/nuxt/pull/30324))
- Cleanup renovate ([6e682b1ff](https://github.com/nuxt/nuxt/commit/6e682b1ff))
- Document `div` wrapper in client-only page ([#30359](https://github.com/nuxt/nuxt/pull/30359))
### ✅ Tests
- Add additional attw test for built packages ([#30206](https://github.com/nuxt/nuxt/pull/30206))
- Improve assertions for spa loading tests ([80bd2d2ec](https://github.com/nuxt/nuxt/commit/80bd2d2ec))
- Bump bundle size snapshot ([d545f9e96](https://github.com/nuxt/nuxt/commit/d545f9e96))
- Try to improve spa preloader tests ([08219a502](https://github.com/nuxt/nuxt/commit/08219a502))
- Ensure dev server is loaded before running tests ([f66cf928e](https://github.com/nuxt/nuxt/commit/f66cf928e))
### 🤖 CI
- Ignore dev-dependencies for engines.node ([e366a6feb](https://github.com/nuxt/nuxt/commit/e366a6feb))
- Analyse github actions with codeql ([#30293](https://github.com/nuxt/nuxt/pull/30293))
- Exclude file that codeql cannot analyse ([7e03b08a6](https://github.com/nuxt/nuxt/commit/7e03b08a6))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- Julien Huang (@huang-julien)
- Mehmet (@productdevbook)
- @beer (@iiio2)
- Nishant Aanjaney Jalan (@cybercoder-naj)
- David Nahodyl (@Smef)
- Vuk Marjanovic (@vmrjnvc)
- Alexander Lichter (@TheAlexLichter)
- Bobbie Goede (@BobbieGoede)
- Connor Roberts (@murshex)
- Matej Černý (@cernymatej)
- derHodrig (@derHodrig)
- Martins Zeltins (@martinszeltins)
- Matt (@matt-clegg)
- Nikolay (@RokeAlvo)
- Joaquín Sánchez (@userquin)
- bjoaquinc (@bjoaquinc)
- wzc520pyfm (@wzc520pyfm)
- Kraig Burrows (@zync09)
- Lucie (@lihbr)
- Harlan Wilton (@harlan-zw)
- 一纸忘忧 (@ikxin)
- Sébastien LeBlanc (@mrleblanc101)
- Teena (@franklin-tina)
- skmedix (@skmedix)
- Daniel Rentz (@danielrentz)
- Inesh Bose (@ineshbose)
- Felix Gabler (@felixgabler)
- Damian Głowala (@DamianGlowala)
- mianlang (@mianlang)
- Tamás H. (@Tamas-hi)
- xjccc (@xjccc)
- Guillaume Chau (@Akryum)
- Farnabaz (@farnabaz)
v3.14.1592 (2024-11-19)
> 3.14.1592 is the next patch release.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.14.159...v3.14.160)
### 🩹 Fixes
- **rspack:** Update `webpackbar` with support for rspack ([#29823](https://github.com/nuxt/nuxt/pull/29823))
- **nuxt:** Assign default name to component without setup ([#29869](https://github.com/nuxt/nuxt/pull/29869))
- **kit:** Use `dst` to deduplicate templates when adding them ([#29895](https://github.com/nuxt/nuxt/pull/29895))
- **nuxt:** Handle empty plugin files ([d44408e87](https://github.com/nuxt/nuxt/commit/d44408e87))
- **vite:** Use resolved nuxt template `dst` to invalidate modules ([6cd3352de](https://github.com/nuxt/nuxt/commit/6cd3352de))
- **nuxt:** Return null map for empty plugin metadata ([302a66da9](https://github.com/nuxt/nuxt/commit/302a66da9))
- **kit:** Resolve module paths before appending subpaths ([#29955](https://github.com/nuxt/nuxt/pull/29955))
- **nuxt:** Recompile templates on `change` events ([#29954](https://github.com/nuxt/nuxt/pull/29954))
- **nuxt:** Do not include `` when building ([#29956](https://github.com/nuxt/nuxt/pull/29956))
- **nuxt:** Allow scanning metadata from 2+ files at same path ([#29969](https://github.com/nuxt/nuxt/pull/29969))
- **nuxt:** Do not disallow importing nitro dependencies ([#29975](https://github.com/nuxt/nuxt/pull/29975))
### 💅 Refactors
- **nuxt:** Define layouts as async vue components ([#29957](https://github.com/nuxt/nuxt/pull/29957))
### 📖 Documentation
- Update custom environment example ([e3759ad55](https://github.com/nuxt/nuxt/commit/e3759ad55))
- Update minimal example ([7973f5ed4](https://github.com/nuxt/nuxt/commit/7973f5ed4))
- Add tip about islands directory ([#29913](https://github.com/nuxt/nuxt/pull/29913))
- Fix typo in composable name ([#29910](https://github.com/nuxt/nuxt/pull/29910))
- Rename @nuxt/auth to @nuxt/auth-utils in roadmap ([#29906](https://github.com/nuxt/nuxt/pull/29906))
- Capitalize text ([#29938](https://github.com/nuxt/nuxt/pull/29938))
- Improve clarity in seo meta example ([#29930](https://github.com/nuxt/nuxt/pull/29930))
- Update getting started to include WebStorm ([#29845](https://github.com/nuxt/nuxt/pull/29845))
### 🏡 Chore
- Remove unused imports and update eslint config ([#29876](https://github.com/nuxt/nuxt/pull/29876))
### ✅ Tests
- Add import protection test ([fbd5c33ba](https://github.com/nuxt/nuxt/commit/fbd5c33ba))
### 🤖 CI
- Remove release-pr workflow ([2915f93c3](https://github.com/nuxt/nuxt/commit/2915f93c3))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- Gustavo Aquino Torres Teixeira (@guska8)
- Stephanie Smith (@stephiescastle)
- @beer (@iiio2)
- Maxime Pauvert (@maximepvrt)
- crisarji (@crisarji)
- RBV1 (@RBV1)
- Adrien Foulon (@Tofandel)
- Julien Huang (@huang-julien)
- Horu (@HigherOrderLogic)
- Jan-Niklas W. (@niklas-wortmann)
v3.14.159 (2024-11-06)
> 3.14.159 is a hotfix release to address regressions in v3.14.
We're leaning into the π theme - future patch releases of this minor version will just continue adding digits. (Sorry for any inconvenience! 😆)
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.14.0...v3.14.1)
### 🩹 Fixes
- **nuxt:** Update nitropack preset directory ([#29780](https://github.com/nuxt/nuxt/pull/29780))
- **kit:** Fall back to meta version if there's no `module.json` ([#29793](https://github.com/nuxt/nuxt/pull/29793))
- **kit:** Use `mlly` to resolve module paths to avoid cjs fallback ([#29799](https://github.com/nuxt/nuxt/pull/29799))
- **webpack,rspack:** Add adapter for `webpack-dev-middleware` ([#29806](https://github.com/nuxt/nuxt/pull/29806))
- **nuxt:** Remove null-byte prefix for virtual files ([#29809](https://github.com/nuxt/nuxt/pull/29809))
- **kit:** Convert module path to file url before reading meta ([fb833ac64](https://github.com/nuxt/nuxt/commit/fb833ac64))
### 📖 Documentation
- Capitalize titles ([#29768](https://github.com/nuxt/nuxt/pull/29768))
- Fix rou3 link in nitro.js ([#29775](https://github.com/nuxt/nuxt/pull/29775))
- Fix tip formatting ([#29792](https://github.com/nuxt/nuxt/pull/29792))
- Add link to h3 blogpost ([#29794](https://github.com/nuxt/nuxt/pull/29794))
- Remove outdated cloudflare tip (auto minify deprecated) ([#29812](https://github.com/nuxt/nuxt/pull/29812))
### 🏡 Chore
- **nuxt:** Remove redundant type ([#29810](https://github.com/nuxt/nuxt/pull/29810))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- xjccc (@xjccc)
- Efraim (@EfraimGENC)
- Aurion SARL (@Aurion72)
- Erik Lilja (@Lilja)
- Markus Oberlehner (@maoberlehner)
- Lukas Bauer (@luxterful)
- @beer (@iiio2)
v3.14.0 (2024-11-04)
> 3.14.0 is the next minor release.
## 👀 Highlights
Behind the scenes, a lot has been going on in preparation for the release of Nuxt v4 (particularly on the `unjs` side with preparations for Nitro v3!)
### ⚡️ Faster starts powered by `jiti`
Loading the nuxt config file, as well as modules and other build-time code, is now powered by `jiti` v2. You can see more about the release in the [jiti v2 release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0), but one of the most important pieces is native node esm import (where possible), which should mean a faster start. ✨
### 📂 Shared folder for code and types shared with client/server
You should never import Vue app code in your nitro code (or the other way around). But this has meant a friction point when it comes to sharing types or utilities that _don't_ rely on the nitro/vue contexts.
For this, we have a new `shared/` folder ([#28682](https://github.com/nuxt/nuxt/pull/28682)). You can't import Vue or nitro code _into_ files in this folder, but it produces auto-imports you can consume throughout the rest of your app.
If needed you can use the new `#shared` alias which points to this folder.
The shared folder is alongside your `server/` folder. (If you're using `compatibilityVersion: 4`, this means it's not inside your `app/` folder.)
### 🦀 `rspack` builder
We're excited to announce a new first-class Nuxt builder for `rspack`. It's still experimental but we've refactored the internal Nuxt virtual file system to use `unplugin` to make this possible.
Let us know if you like it - and feel free to raise any issues you experience with it.
👉 To try it out, you can use [this starter](https://github.com/danielroe/nuxt-rspack-starter) - or just install `@nuxt/rspack-builder` and set `builder: 'rspack'` in your nuxt config file.
### ✨ New composables
We have new `useResponseHeader` and `useRuntimeHook` composables ([#27131](https://github.com/nuxt/nuxt/pull/27131) and [#29741](https://github.com/nuxt/nuxt/pull/29741)).
### 🔧 New module utilities
We now have a new `addServerTemplate` utility ([#29320](https://github.com/nuxt/nuxt/pull/29320)) for adding virtual files for access inside nitro runtime routes.
### 🚧 v4 changes
We've merged some changes which only take effect with `compatibilityVersion: 4`, but which you can opt-into earlier.
1. previously, if you had a component like `~/components/App/Header.vue` this would be visible in your devtools as ``. From v4 we ensure this is ``, but it's opt-in to avoid breaking any manual `` you might have implemented. ([#28745](https://github.com/nuxt/nuxt/pull/28745)).
1. Nuxt scans page metadata from your files, before calling `pages:extend`. But this has led to some confusing behaviour, as pages added at this point do not end up having their page metadata respected. So we now do not scan metadata before calling `pages:extend`. Instead, we have a new `pages:resolved` hook, which is called after `pages:extend`, after all pages have been augmented with their metadata. I'd recommend opting into this by setting `experimental.scanPageMeta` to `after-resolve`, as it solves a number of bugs.
## 🗺️ Roadmap to v3.15
They didn't quite make it in time for v3.14 but for the next minor release you can expect (among other things):
- [ ] auto-imported directives from modules ([#29203](https://github.com/nuxt/nuxt/pull/29203))
- [ ] 'isolated' page renders ([#29366](https://github.com/nuxt/nuxt/pull/29366))
- [ ] delayed hydration ([#26468](https://github.com/nuxt/nuxt/pull/26468))
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
npx nuxi@latest upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.13.2...v3.14.0)
### 🚀 Enhancements
- **deps:** Upgrade to latest version of jiti ([#27995](https://github.com/nuxt/nuxt/pull/27995))
- **kit,nuxt,vite,webpack:** Reimplement cjs utils using `jiti` ([#29073](https://github.com/nuxt/nuxt/pull/29073))
- **nuxt:** Normalise component names to match nuxt pattern ([#28745](https://github.com/nuxt/nuxt/pull/28745))
- **kit,schema:** Add `addServerTemplate` utility ([#29320](https://github.com/nuxt/nuxt/pull/29320))
- **nuxt:** Add `useResponseHeader` composable ([#27131](https://github.com/nuxt/nuxt/pull/27131))
- **rspack,webpack:** Add `rspack` builder ([#29142](https://github.com/nuxt/nuxt/pull/29142))
- **nuxt,schema:** `pages:resolved` hook + scan meta post extend ([#28861](https://github.com/nuxt/nuxt/pull/28861))
- **nuxt:** Allow enabling route props in `definePageMeta` ([#29586](https://github.com/nuxt/nuxt/pull/29586))
- **schema,nuxt:** Add `shared/` folder and `#shared` alias ([#28682](https://github.com/nuxt/nuxt/pull/28682))
- **nuxt:** Allow chunk error or manifest update -> reload ([#28160](https://github.com/nuxt/nuxt/pull/28160))
- **nuxt:** Add `useRuntimeHook` composable ([#29741](https://github.com/nuxt/nuxt/pull/29741))
### 🔥 Performance
- **nuxt:** Remove unneeded second call to `useNuxtApp` ([#29514](https://github.com/nuxt/nuxt/pull/29514))
- **vite:** Avoid redundant postcss plugins overwrite ([#29619](https://github.com/nuxt/nuxt/pull/29619))
- **kit,nuxt,vite,webpack:** Hoist regex patterns ([#29620](https://github.com/nuxt/nuxt/pull/29620))
### 🩹 Fixes
- **nuxt:** Simplify plugin `InjectionType` template conditional ([#29023](https://github.com/nuxt/nuxt/pull/29023))
- **nuxt:** Access server build from `webpack` memfs ([#29027](https://github.com/nuxt/nuxt/pull/29027))
- **nuxt:** Do not resolve non-absolute component paths ([#29036](https://github.com/nuxt/nuxt/pull/29036))
- **nuxt:** Defer unsetting error handler until suspense resolves ([#29037](https://github.com/nuxt/nuxt/pull/29037))
- **nuxt:** Pass `DOMException` as fetch abort exception ([#29058](https://github.com/nuxt/nuxt/pull/29058))
- **vite:** Don't force protocol if disabled `devServer.https` ([#29049](https://github.com/nuxt/nuxt/pull/29049))
- **nuxt:** Empty nitro `buildDir` in dev mode ([#29068](https://github.com/nuxt/nuxt/pull/29068))
- **nuxt:** Don't resolve relative import type paths for deps ([#29069](https://github.com/nuxt/nuxt/pull/29069))
- **kit:** Handle passing 'bare' relative paths to modules ([c7fecd8a1](https://github.com/nuxt/nuxt/commit/c7fecd8a1))
- **kit:** Try resolving module path from each node_modules dir ([70a622d43](https://github.com/nuxt/nuxt/commit/70a622d43))
- **kit,vite,webpack:** Resolve postcss paths from each modules dir ([#29096](https://github.com/nuxt/nuxt/pull/29096))
- **kit,vite,webpack:** Strip `node_modules/` from parent urls ([5bd42c893](https://github.com/nuxt/nuxt/commit/5bd42c893))
- **nuxt:** Add `crossorigin` attribute for stylesheets ([#29138](https://github.com/nuxt/nuxt/pull/29138))
- **nuxt:** Use `routeRules` to hint pages to prerender ([#29172](https://github.com/nuxt/nuxt/pull/29172))
- **nuxt:** Pass absolute external link urls to `link:prefetch` ([#29321](https://github.com/nuxt/nuxt/pull/29321))
- **nuxt:** Error on build when required module is missing ([#29287](https://github.com/nuxt/nuxt/pull/29287))
- **nuxt:** Prevent 404 when hitting component test endpoint ([cb725f014](https://github.com/nuxt/nuxt/commit/cb725f014))
- **nuxt:** Avoid throwing 404 error before middleware finishes ([#29054](https://github.com/nuxt/nuxt/pull/29054))
- **schema:** Use `ConfigLayer` type from `c12` ([#29370](https://github.com/nuxt/nuxt/pull/29370))
- **nuxt:** Fix nested page types in `typedPages` ([#29352](https://github.com/nuxt/nuxt/pull/29352))
- **nuxt:** Allow islands to manipulate head client-side ([#29186](https://github.com/nuxt/nuxt/pull/29186))
- **vite:** Dim repeat count in logs ([#29392](https://github.com/nuxt/nuxt/pull/29392))
- **schema:** Mark `configFile` as required in layer type ([3bbcd7d21](https://github.com/nuxt/nuxt/commit/3bbcd7d21))
- **nuxt:** Remove vue compiler hints from auto import ([#29713](https://github.com/nuxt/nuxt/pull/29713))
- **vite:** Update signature for `createIsExternal` ([686be8168](https://github.com/nuxt/nuxt/commit/686be8168))
- **nuxt:** Respect existing `props` value in `definePageMeta` ([#29683](https://github.com/nuxt/nuxt/pull/29683))
- **schema:** Hoist `nitropack/types` to ensure api routes are typed ([54096875e](https://github.com/nuxt/nuxt/commit/54096875e))
### 💅 Refactors
- **nuxt:** Use `addBuildPlugin` internally ([#29157](https://github.com/nuxt/nuxt/pull/29157))
- **nuxt,schema,vite,webpack:** Use unplugin for vfs ([#29165](https://github.com/nuxt/nuxt/pull/29165))
### 📖 Documentation
- Use `defineNuxtComponent` instead of `defineComponent` ([#29011](https://github.com/nuxt/nuxt/pull/29011))
- Remove duotone icons for clarity ([#29040](https://github.com/nuxt/nuxt/pull/29040))
- Fix typo ([#29045](https://github.com/nuxt/nuxt/pull/29045))
- Remove specific Nuxt 4 release date ([#29151](https://github.com/nuxt/nuxt/pull/29151))
- Remove redundant newlines and indentations ([#29190](https://github.com/nuxt/nuxt/pull/29190))
- Add links to short videos from daniel ([#29185](https://github.com/nuxt/nuxt/pull/29185))
- Fix comments typo in auto-imports example ([#29195](https://github.com/nuxt/nuxt/pull/29195))
- Add missing word ([#29230](https://github.com/nuxt/nuxt/pull/29230))
- Add a section about `useRequestFetch` and `event.$fetch` ([#29099](https://github.com/nuxt/nuxt/pull/29099))
- Add example of typing custom `useFetch` errors ([#29253](https://github.com/nuxt/nuxt/pull/29253))
- Ensure manifest code snippet works with pnpm ([#29273](https://github.com/nuxt/nuxt/pull/29273))
- Consistent directory structure ([#29292](https://github.com/nuxt/nuxt/pull/29292))
- Update to new `ofetch` headers for interceptors ([#29118](https://github.com/nuxt/nuxt/pull/29118))
- Mention upgrading third-party configs ([#27768](https://github.com/nuxt/nuxt/pull/27768))
- Improve explanation of ssr + data fetching ([#29010](https://github.com/nuxt/nuxt/pull/29010))
- Add a description for `.env.test` ([#29398](https://github.com/nuxt/nuxt/pull/29398))
- Add section on 'updateAppConfig' in the 'app.config' page ([#29397](https://github.com/nuxt/nuxt/pull/29397))
- Add example to navigateTo util ([#29611](https://github.com/nuxt/nuxt/pull/29611))
- Remove `mockImplementation()` call ([#29669](https://github.com/nuxt/nuxt/pull/29669))
- Update lifecycle hooks ([#29678](https://github.com/nuxt/nuxt/pull/29678))
- Type cast api plugin in custom usefetch example ([#29756](https://github.com/nuxt/nuxt/pull/29756))
- Correct some errors about proxying headers with `$fetch` ([#29755](https://github.com/nuxt/nuxt/pull/29755))
- Add information on `--envName` flag ([#28909](https://github.com/nuxt/nuxt/pull/28909))
- Add error expectation ([09885b87e](https://github.com/nuxt/nuxt/commit/09885b87e))
### 📦 Build
- **ui-templates:** Switch to `beasties` ([1b5391182](https://github.com/nuxt/nuxt/commit/1b5391182))
### 🏡 Chore
- Add more checks around indexed access ([#29060](https://github.com/nuxt/nuxt/pull/29060))
- Refresh lockfile ([f76f85a82](https://github.com/nuxt/nuxt/commit/f76f85a82))
- Revert `unbuild` update ([71e0fb06f](https://github.com/nuxt/nuxt/commit/71e0fb06f))
- Use `jiti.import` ([7ece49f9b](https://github.com/nuxt/nuxt/commit/7ece49f9b))
- Update nitropack to 2.10.2 ([#29766](https://github.com/nuxt/nuxt/pull/29766))
### ✅ Tests
- Bump bundle snapshot ([e57e65c08](https://github.com/nuxt/nuxt/commit/e57e65c08))
- Add basic assertions for `unctx` transform ([d81196122](https://github.com/nuxt/nuxt/commit/d81196122))
- Fix assertion for style snapshot ([7f311e773](https://github.com/nuxt/nuxt/commit/7f311e773))
- Move catchall path to subdirectory ([#29331](https://github.com/nuxt/nuxt/pull/29331))
- Update snapshot for https://github.com/nuxt/nuxt/pull/28441 ([a248f24f5](https://github.com/nuxt/nuxt/commit/a248f24f5))
- Add compat code for vite v6 ([#29677](https://github.com/nuxt/nuxt/pull/29677))
### 🤖 CI
- Rspack semantic scope ([db65d2165](https://github.com/nuxt/nuxt/commit/db65d2165))
- Update lychee config ([#29162](https://github.com/nuxt/nuxt/pull/29162))
- Release dependency updates on nightly channel ([271149bd2](https://github.com/nuxt/nuxt/commit/271149bd2))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- xjccc (@xjccc)
- Pooya Parsa (@pi0)
- Damian Głowala (@DamianGlowala)
- Till Sanders (@tillsanders)
- Nils (@BracketJohn)
- Estéban (@Barbapapazes)
- John Tanzer (@moshetanzer)
- Cruz (@SparK-Cruz)
- Anthony Fu (@antfu)
- 翠 / green (@sapphi-red)
- Taras Batenkov (@enkot)
- Michael Brevard (@GalacticHypernova)
- Bobbie Goede (@BobbieGoede)
- Panopoulos Andreas (@b0ul17)
- Julien Huang (@huang-julien)
- Dawit (@oneminch)
- Ryota Watanabe (@wattanx)
- Alexander (@hywax)
- Ryoya (@harunari0928)
- Jelmer (@jelmerdemaat)
- Nishant Aanjaney Jalan (@cybercoder-naj)
- Christoph Heike (@cheike569)
- Sébastien Chopin (@atinux)
- Jeremy Graziani (@AcelisWeaven)
- Domenik Reitzner (@dreitzner)
- Jeel Rupapara (@zeelrupapara)
- Matej Černý (@CernyMatej)
- Leopold Kristjansson (@leopoldkristjansson)
- Horváth Bálint (@horvbalint)
- 一纸忘忧 (@ikxin)
- Bochkarev Ivan (@Ibochkarev)
- Joschua (@selfire1)
- Indrek Ardel (@Ingramz)
- DarkVen0m (@DarkVen0m)
- Ezra Ashenafi (@Eazash)
v3.13.2 (2024-09-15)
> 3.13.2 is the next regularly scheduled patch release.
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
npx nuxi@latest upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.13.1...v3.13.2)
### 🔥 Performance
- **nuxt:** Remove interop default for dynamic components ([#28912](https://github.com/nuxt/nuxt/pull/28912))
### 🩹 Fixes
- **nuxt:** Fix ssr log querySelector ([#28864](https://github.com/nuxt/nuxt/pull/28864))
- **schema:** Enable `propsDestructure` by default ([#28830](https://github.com/nuxt/nuxt/pull/28830))
- **nuxt:** Ensure injected `route` has enumerable keys ([#28841](https://github.com/nuxt/nuxt/pull/28841))
- **nuxt:** Don't override vue instance with legacy `asyncData` ([#28842](https://github.com/nuxt/nuxt/pull/28842))
- **nuxt:** Render server errors with `ssr: false` ([#28834](https://github.com/nuxt/nuxt/pull/28834))
- **nuxt:** Resolve full component paths ([#28843](https://github.com/nuxt/nuxt/pull/28843))
- **nuxt:** Improve accuracy of module resolution conditions ([#28846](https://github.com/nuxt/nuxt/pull/28846))
- **nuxt:** Log more context of prerendering errors ([#28895](https://github.com/nuxt/nuxt/pull/28895))
- **nuxt:** Enable `injectAtEnd` to reduce circular auto-imports ([#28822](https://github.com/nuxt/nuxt/pull/28822))
- **nuxt:** Ensure we process files in `buildDir` for unimport ([#28899](https://github.com/nuxt/nuxt/pull/28899))
- **nuxt:** Do not accept attrs on `` ([#28901](https://github.com/nuxt/nuxt/pull/28901))
- **nuxt,schema:** Accept any module in inline `modules` array ([#28922](https://github.com/nuxt/nuxt/pull/28922))
- **nuxt:** Fall back to original component `filePath` ([#28925](https://github.com/nuxt/nuxt/pull/28925))
- **nuxt:** Make `runWithContext` generic ([#28926](https://github.com/nuxt/nuxt/pull/28926))
- **nuxt:** Set `inheritAttrs: false` for fragment components ([#28939](https://github.com/nuxt/nuxt/pull/28939))
- **nuxt:** Use case-insensitive regexp for `
```
will now log to your browser console when you refresh the page:
```bash
Log from index page
[ssr] Log inside useAsyncData
at pages/index.vue
```
👉 We also plan to support streaming of subsequent logs to the Nuxt DevTools in future.
We've also added a `dev:ssr-logs` hook (both in Nuxt and Nitro) which is called on server and client, allowing you to handle them yourself if you want to.
If you encounter any issues with this, it is possible to disable them - or prevent them from logging to your browser console.
```ts [nuxt.config.ts]
export default defineNuxtConfig({
features: {
devLogs: false
// or 'silent' to allow you to handle yourself with `dev:ssr-logs` hook
},
})
```
### 🎨 Preview mode
A new `usePreviewMode` composable aims to make it simple to use preview mode in your Nuxt app.
```ts [plugins/test.client.ts]
const { enabled, state } = usePreviewMode()
```
When preview mode is enabled, all your data fetching composables, like `useAsyncData` and `useFetch` will rerun, meaning any cached data in the payload will be bypassed.
[Read more in the docs](https://nuxt.com/docs/api/composables/use-preview-mode).
### 💰 Cache-busting payloads
We now automatically cache-bust your payloads if you haven't disabled Nuxt's app manifest, meaning you shouldn't be stuck with outdated data after a deployment.
### 👮♂️ Middleware `routeRules`
It's now possible to define middleware for page paths within the Vue app part of your application (that is, not your Nitro routes) ([#25841](https://github.com/nuxt/nuxt/pull/25841)).
```ts [nuxt.config.ts]
export default defineNuxtConfig({
routeRules: {
'/admin/**': {
// or appMiddleware: 'auth'
appMiddleware: ['auth']
},
'/admin/login': {
// You can 'turn off' middleware that would otherwise run for a page
appMiddleware: {
auth: false
}
},
},
})
```
## ⌫ New `clear` data fetching utility
Now, `useAsyncData` and `useFetch` expose a `clear` utility. This is a function that can be used to set `data` to undefined, set `error` to `null`, set `pending` to `false`, set `status` to `idle`, and mark any currently pending requests as cancelled. ([#26259](https://github.com/nuxt/nuxt/pull/26259))
```vue
```
### 🕳️ New `#teleports` target
Nuxt now includes a new `` element in your app within your `` tag. It supports server-side teleports, meaning you can do this safely on the server:
```vue
Something
```
### 🚦 Loading indicator and transition controls
It's now possible to set custom timings for hiding the loading indicator, and forcing the `finish()` method if needed ([#25932](https://github.com/nuxt/nuxt/pull/25932)).
There's also a new `page:view-transition:start` hook for hooking into the View Transitions API ([#26045](https://github.com/nuxt/nuxt/pull/26045)) if you have that feature enabled.
### 🛍️ Server- and client-only pages
This release sees server- and client-only pages land in Nuxt! You can now add a `.server.vue` or `.client.vue` suffix to a page to get automatic handling of it.
**Client-only pages** will render entirely on the client-side, and skip server-rendering entirely, just as if the entire page was wrapped in ``. Use this responsibly. The flash of load on the client-side can be a bad user experience so make sure you really need to avoid server-side loading. Also consider using `` with a `fallback` slot to render a skeleton loader ([#25037](https://github.com/nuxt/nuxt/pull/25037)).
⚗️ **Server-only pages** are even more useful because they enable you to integrate fully-server rendered HTML within client-side navigation. They will even be prefetched when links to them are in the viewport - so you will get instantaneous loading ([#24954](https://github.com/nuxt/nuxt/pull/24954)).
### 🤠 Server component bonanza
When you are using server components, you can now use the `nuxt-client` attribute anywhere within your tree ([#25479](https://github.com/nuxt/nuxt/pull/25479)).
```ts
export default defineNuxtConfig({
experimental: {
componentIslands: {
selectiveClient: 'deep'
}
},
})
```
You can listen to an `@error` event from server components that will be triggered if there is any issue loading the component ([#25798](https://github.com/nuxt/nuxt/pull/25798)).
Finally, server-only components are now smartly enabled when you have a server-only component or a server-only page within your project or any of its layers ([#26223](https://github.com/nuxt/nuxt/pull/26223)).
> [!WARNING]
> Server components remain experimental and their API may change, so be careful
> before depending on implementation details.
### 🔥 Performance improvements
We've shipped a number of performance improvements, including only updating changed virtual templates ([#26250](https://github.com/nuxt/nuxt/pull/26250)), using a 'layered' prerender cache ([#26104](https://github.com/nuxt/nuxt/pull/26104)) that falls back to filesystem instead of keeping everything in memory when prerendering - and lots of other examples.
### 📂 Public assets handling
We have shipped a reimplementation of Vite's public asset handling, meaning that public assets in your `public/` directory or your layer directories are now resolved entirely by Nuxt ([#26163](https://github.com/nuxt/nuxt/pull/26163)), so if you have added `nitro.publicAssets` directories with a custom prefix, these will now work.
### 📦 Chunk naming
We have changed the default `_nuxt/[name].[hash].js` file name pattern for your JS chunks. Now, we default to `_nuxt/[hash].js`. This is to avoid false positives by ad blockers triggering off your component or chunk names, which can be a very difficult issue to debug. ([#26203](https://github.com/nuxt/nuxt/pull/26203))
You can easily configure this to revert to previous behaviour if you wish:
```ts
export default defineNuxtConfig({
vite: {
$client: {
build: {
rollupOptions: {
output: {
chunkFileNames: '_nuxt/[name].[hash].js',
entryFileNames: '_nuxt/[name].[hash].js'
}
}
}
}
},
})
```
### 💪 Type fixes
Previously users with `shamefully-hoist=false` may have encountered issues with types not being resolved or working correctly. You may also have encountered problems with excessive type instantiation.
We now try to tell TypeScript about certain key types so they can be resolved even if deeply nested ([#26158](https://github.com/nuxt/nuxt/pull/26158)).
There are a whole raft of other type fixes, including some regarding import types ([#26218](https://github.com/nuxt/nuxt/pull/26218) and [#25965](https://github.com/nuxt/nuxt/pull/25965)) and module typings ([#25548](https://github.com/nuxt/nuxt/pull/25548)).
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
nuxi upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.10.3...v3.11.0)
### 🚀 Enhancements
- **nuxt:** Server-only pages ([#24954](https://github.com/nuxt/nuxt/pull/24954))
- **nuxt:** Client-only pages ([#25037](https://github.com/nuxt/nuxt/pull/25037))
- **nuxt:** Allow using `nuxt-client` in all components ([#25479](https://github.com/nuxt/nuxt/pull/25479))
- **nuxt:** Add `page:view-transition:start` hook ([#26045](https://github.com/nuxt/nuxt/pull/26045))
- **nuxt:** Custom loading reset/hide delay + force `finish()` ([#25932](https://github.com/nuxt/nuxt/pull/25932))
- **nuxt:** Emit error if `` can't fetch island ([#25798](https://github.com/nuxt/nuxt/pull/25798))
- **nuxt:** `usePreviewMode` composable ([#21705](https://github.com/nuxt/nuxt/pull/21705))
- **nuxt:** Support async transforms for data composables ([#26154](https://github.com/nuxt/nuxt/pull/26154))
- **nuxt:** Add dedicated `#teleports` element for ssr teleports ([#25043](https://github.com/nuxt/nuxt/pull/25043))
- **nuxt:** Enable islands if server pages/components present ([#26223](https://github.com/nuxt/nuxt/pull/26223))
- **nuxt:** Allow generating metadata for nuxt components ([#26204](https://github.com/nuxt/nuxt/pull/26204))
- **vite:** Handle multiple/custom public dirs ([#26163](https://github.com/nuxt/nuxt/pull/26163))
- **schema:** Allow configuring type hoists with `typescript.hoist` ([85166cced](https://github.com/nuxt/nuxt/commit/85166cced))
- **nuxt:** Pass nuxt instance to `getCachedData` ([#26287](https://github.com/nuxt/nuxt/pull/26287))
- **nuxt:** Pass server logs to client ([#25936](https://github.com/nuxt/nuxt/pull/25936))
- **nuxt:** Add `nuxtMiddleware` route rule ([#25841](https://github.com/nuxt/nuxt/pull/25841))
- **nuxt:** Add `clear` utility to `useAsyncData`/`useFetch` ([#26259](https://github.com/nuxt/nuxt/pull/26259))
### 🔥 Performance
- Early return chained functions with falsy values ([#25647](https://github.com/nuxt/nuxt/pull/25647))
- **nuxt:** Don't check `isPrerendered` in dev for server page ([#26061](https://github.com/nuxt/nuxt/pull/26061))
- **nuxt:** Use fallthrough cache for prerender ([#26104](https://github.com/nuxt/nuxt/pull/26104))
- **nuxt:** Tree shake island renderer ([8323220f7](https://github.com/nuxt/nuxt/commit/8323220f7))
- **nuxt:** Skip adding selective-client code if not enabled ([#26176](https://github.com/nuxt/nuxt/pull/26176))
- **nuxt:** Use faster approach to check cache exists ([#26172](https://github.com/nuxt/nuxt/pull/26172))
- **nuxt:** Only update changed templates ([#26250](https://github.com/nuxt/nuxt/pull/26250))
### 🩹 Fixes
- **kit:** Apply nuxt types to `.config/nuxt.config` ([5440ecece](https://github.com/nuxt/nuxt/commit/5440ecece))
- **kit:** Widen pattern to `.config/nuxt.*` ([7815aa534](https://github.com/nuxt/nuxt/commit/7815aa534))
- **nuxt:** Align `error` in `showError`/`createError` with h3 ([#25945](https://github.com/nuxt/nuxt/pull/25945))
- **kit:** Don't warn if middleware is added twice ([08b656a04](https://github.com/nuxt/nuxt/commit/08b656a04))
- **nuxt:** Don't try to strip directory file extensions ([#25965](https://github.com/nuxt/nuxt/pull/25965))
- **nuxt:** Produce valid css selector from `useId` ([#25969](https://github.com/nuxt/nuxt/pull/25969))
- **schema:** Add `vueCompilerOptions` property to `tsConfig` ([#25924](https://github.com/nuxt/nuxt/pull/25924))
- **nuxt:** Skip vue style blocks in unctx transform ([#26059](https://github.com/nuxt/nuxt/pull/26059))
- **nuxt:** Pass event to `useRuntimeConfig` in Nuxt renderer ([#26058](https://github.com/nuxt/nuxt/pull/26058))
- **schema:** Disable `typescript.shim` in favour of volar ([#26052](https://github.com/nuxt/nuxt/pull/26052))
- **nuxt:** Only check if server page is prerendered on client ([#26081](https://github.com/nuxt/nuxt/pull/26081))
- **nuxt:** Don't refetch server components in initial html ([#26089](https://github.com/nuxt/nuxt/pull/26089))
- **nuxt:** Resolve `defu`/`h3` paths in type templates ([#26085](https://github.com/nuxt/nuxt/pull/26085))
- **nuxt:** Use exported `toExports` from `unimport` ([#26086](https://github.com/nuxt/nuxt/pull/26086))
- **nuxt:** Cache-bust payloads with build id ([#26068](https://github.com/nuxt/nuxt/pull/26068))
- **nuxt:** Export `AsyncDataRequestStatus` type ([#26023](https://github.com/nuxt/nuxt/pull/26023))
- **nuxt:** Add space before `` and `` attrs ([#26027](https://github.com/nuxt/nuxt/pull/26027))
- **kit:** Resolve module `node_modules` for `modulesDir` ([#25548](https://github.com/nuxt/nuxt/pull/25548))
- **nuxt:** Handle external redirects from `routeRules` ([#26120](https://github.com/nuxt/nuxt/pull/26120))
- **nuxt:** Use flat cache directory for prerender data ([47cdd7dd0](https://github.com/nuxt/nuxt/commit/47cdd7dd0))
- **nuxt:** Watch custom `cookieRef` values deeply ([#26151](https://github.com/nuxt/nuxt/pull/26151))
- **nuxt:** Access prerender cache synchronously ([#26146](https://github.com/nuxt/nuxt/pull/26146))
- **nuxt:** Provide typescript aliases for core packages ([#26158](https://github.com/nuxt/nuxt/pull/26158))
- **nuxt:** Handle errors resolving package paths ([63bfaac12](https://github.com/nuxt/nuxt/commit/63bfaac12))
- **kit:** Handle errors resolving module path ([3782ac0a2](https://github.com/nuxt/nuxt/commit/3782ac0a2))
- **nuxt:** Clone paths to prevent shared object ([264bf9833](https://github.com/nuxt/nuxt/commit/264bf9833))
- **nuxt:** Detect component usage within `ssrRender` ([#26162](https://github.com/nuxt/nuxt/pull/26162))
- **nuxt:** Improved plugin annotating warnings ([#26193](https://github.com/nuxt/nuxt/pull/26193))
- **nuxt:** Generate typed routes after pages are scanned ([#26206](https://github.com/nuxt/nuxt/pull/26206))
- **nuxt:** Only strip supported extensions when generating import types ([#26218](https://github.com/nuxt/nuxt/pull/26218))
- **nuxt:** Init payload when using islands with `ssr: false` ([f080c426a](https://github.com/nuxt/nuxt/commit/f080c426a))
- **nuxt:** Register/scan plugins with jsx/tsx extensions ([#26230](https://github.com/nuxt/nuxt/pull/26230))
- **nuxt:** Update auto imports after other templates ([#26249](https://github.com/nuxt/nuxt/pull/26249))
- **nuxt:** Respect `baseUrl` within server components ([#25727](https://github.com/nuxt/nuxt/pull/25727))
- **nuxt:** Access shared asyncData state with `useNuxtData` ([#22277](https://github.com/nuxt/nuxt/pull/22277))
- **vite:** Explicitly import `publicAssetsURL` ([9d08cdfd1](https://github.com/nuxt/nuxt/commit/9d08cdfd1))
- **nuxt:** Don't ignore any files from `buildAssetsDir` ([81933dfc3](https://github.com/nuxt/nuxt/commit/81933dfc3))
- **vite:** Drop name prefix for client chunk file names ([#26203](https://github.com/nuxt/nuxt/pull/26203))
- **kit:** Clone middleware when adding to app ([5be9253cf](https://github.com/nuxt/nuxt/commit/5be9253cf))
- **nuxt:** Don't generate separate chunk for stubs ([#26291](https://github.com/nuxt/nuxt/pull/26291))
- **nuxt:** Use `joinRelativeURL` for build assets ([#26282](https://github.com/nuxt/nuxt/pull/26282))
- **schema:** Allow passing `deep` to `selectiveClient` ([357f8db41](https://github.com/nuxt/nuxt/commit/357f8db41))
- **schema:** Don't hoist types for `consola` for now ([adbd53a25](https://github.com/nuxt/nuxt/commit/adbd53a25))
- **nuxt:** Guard `window` access more carefully ([977377777](https://github.com/nuxt/nuxt/commit/977377777))
- **nuxt:** Provide appMiddleware types with universal router ([87c0678f9](https://github.com/nuxt/nuxt/commit/87c0678f9))
- **nuxt:** Handle nightly releases for hoisted types ([3c7e68c84](https://github.com/nuxt/nuxt/commit/3c7e68c84))
### 💅 Refactors
- **nuxt:** Simplify `request` computation ([#26191](https://github.com/nuxt/nuxt/pull/26191))
- **nuxt:** Rename `nuxtMiddleware` to `appMiddleware` ([cac745470](https://github.com/nuxt/nuxt/commit/cac745470))
- **nuxt:** Use addTypeTemplate for page augmentations ([4925670dc](https://github.com/nuxt/nuxt/commit/4925670dc))
- **nuxt:** Use addTypeTemplate in more places ([33ce71dd1](https://github.com/nuxt/nuxt/commit/33ce71dd1))
### 📖 Documentation
- Mention when `useId` composable was introduced ([#25953](https://github.com/nuxt/nuxt/pull/25953))
- Add `domEnvironment` option to testing example ([#25972](https://github.com/nuxt/nuxt/pull/25972))
- Update VS Code settings ([#25985](https://github.com/nuxt/nuxt/pull/25985))
- Mention island features are SFC only ([#26013](https://github.com/nuxt/nuxt/pull/26013))
- Improve pick and transform doc ([#26043](https://github.com/nuxt/nuxt/pull/26043))
- Fix 404 link ([8e6d2306c](https://github.com/nuxt/nuxt/commit/8e6d2306c))
- Add Nuxt Fonts to changelog ([#26077](https://github.com/nuxt/nuxt/pull/26077))
- Update roadmap ([#26072](https://github.com/nuxt/nuxt/pull/26072))
- Document `fallback` prop for `` ([#26091](https://github.com/nuxt/nuxt/pull/26091))
- Add documentation for using layers with private repos ([#26094](https://github.com/nuxt/nuxt/pull/26094))
- Remove twoslash from code sample ([0bf70bd7a](https://github.com/nuxt/nuxt/commit/0bf70bd7a))
- Update cssnano website url ([d6edb30c5](https://github.com/nuxt/nuxt/commit/d6edb30c5))
- Add warning about latest `vue-tsc` ([#26083](https://github.com/nuxt/nuxt/pull/26083))
- Improve readme readability ([#26118](https://github.com/nuxt/nuxt/pull/26118))
- Added bridge `macros.pageMeta` and `typescript.esbuild` option ([#26136](https://github.com/nuxt/nuxt/pull/26136))
- Fix bracket escape on `definePageMeta` page ([#26139](https://github.com/nuxt/nuxt/pull/26139))
- Add `app:manifest:update` hook ([#26192](https://github.com/nuxt/nuxt/pull/26192))
- Add cache.varies docs for multi-tenant use case ([#26197](https://github.com/nuxt/nuxt/pull/26197))
- Add mentions on Vue School tutorials ([#25997](https://github.com/nuxt/nuxt/pull/25997))
- Update link to `zhead` ([e889a7df5](https://github.com/nuxt/nuxt/commit/e889a7df5))
- Added modular architecture use case for Layers ([#26240](https://github.com/nuxt/nuxt/pull/26240))
- Escape 'elements' in jsdoc comments ([5c6dc4c14](https://github.com/nuxt/nuxt/commit/5c6dc4c14))
- Use a more common word ([#26276](https://github.com/nuxt/nuxt/pull/26276))
- Split a sentence in two to improve readability ([#26279](https://github.com/nuxt/nuxt/pull/26279))
- Removed unused composable example ([#26283](https://github.com/nuxt/nuxt/pull/26283))
- Add more keywords for reducer/reviver docs ([6b1f3438b](https://github.com/nuxt/nuxt/commit/6b1f3438b))
- Link to pinceau repo rather than website ([#26286](https://github.com/nuxt/nuxt/pull/26286))
- Add link to ofetch repo ([#26284](https://github.com/nuxt/nuxt/pull/26284))
- Improve section titles in error-handling docs ([#26288](https://github.com/nuxt/nuxt/pull/26288))
- Add example for `clear` ([24217a992](https://github.com/nuxt/nuxt/commit/24217a992))
- Add docs about playwright runner support ([115298a44](https://github.com/nuxt/nuxt/commit/115298a44))
- Add some `appMiddleware` docs ([da8e8eba8](https://github.com/nuxt/nuxt/commit/da8e8eba8))
### 🏡 Chore
- Use consistent quotes/semi ([5e5e96992](https://github.com/nuxt/nuxt/commit/5e5e96992))
- Add tea.yml (experimental) ([36e77c885](https://github.com/nuxt/nuxt/commit/36e77c885))
- Remove second twoslash prop too 🤔 ([1b2c55765](https://github.com/nuxt/nuxt/commit/1b2c55765))
- Update .npmrc ([#26135](https://github.com/nuxt/nuxt/pull/26135))
- Add back stylistic rules and lint project ([7252b56d5](https://github.com/nuxt/nuxt/commit/7252b56d5))
- Remove trailing slash in issue template ([#26268](https://github.com/nuxt/nuxt/pull/26268))
- Bump ip and follow-redirects ([1dc51668a](https://github.com/nuxt/nuxt/commit/1dc51668a))
- Remove old code ([79ea75e72](https://github.com/nuxt/nuxt/commit/79ea75e72))
- Temporarily remove codspeed plugin ([beeda8acf](https://github.com/nuxt/nuxt/commit/beeda8acf))
- Tidy dependencies ([0fc363a4f](https://github.com/nuxt/nuxt/commit/0fc363a4f))
- Update knip schema ([d6ce3453c](https://github.com/nuxt/nuxt/commit/d6ce3453c))
- Do not export unused type ([c6aa61783](https://github.com/nuxt/nuxt/commit/c6aa61783))
- **nuxt:** Ensure type template has const filename ([1cae15a3a](https://github.com/nuxt/nuxt/commit/1cae15a3a))
### ✅ Tests
- Use retryable assertion for `scrollY` ([#26298](https://github.com/nuxt/nuxt/pull/26298))
- Also run composables test with appManifest off ([205d0e2fa](https://github.com/nuxt/nuxt/commit/205d0e2fa))
- Remove wait for `networkidle` ([9b5bffbbb](https://github.com/nuxt/nuxt/commit/9b5bffbbb))
- Use locator assertion for body text ([3d77e267d](https://github.com/nuxt/nuxt/commit/3d77e267d))
- Use function assertion for second scrollY test ([d981c056d](https://github.com/nuxt/nuxt/commit/d981c056d))
- Add type test for appMiddleware route rules ([70669012f](https://github.com/nuxt/nuxt/commit/70669012f))
### 🤖 CI
- Clean up pr cache when it is merged ([#25873](https://github.com/nuxt/nuxt/pull/25873))
- Skip checking stackoverflow link ([0a8c3444a](https://github.com/nuxt/nuxt/commit/0a8c3444a))
- Fix lychee configuration ([375bd64c5](https://github.com/nuxt/nuxt/commit/375bd64c5))
- Run lint step after bundle test ([c3c9c4b2a](https://github.com/nuxt/nuxt/commit/c3c9c4b2a))
- Release in ci when a v3 tag is pushed ([c78c1161a](https://github.com/nuxt/nuxt/commit/c78c1161a))
- Do not cache Playwright browsers ([#26296](https://github.com/nuxt/nuxt/pull/26296))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- Damian Głowala (@DamianGlowala)
- Horu (@HigherOrderLogic)
- Max Schmitt (@mxschmitt)
- Tanvir Rahman (@Tanvir-rahman)
- Julien Huang (@huang-julien)
- Maik Kowol (@94726)
- Marc Cremer (@marccremer)
- OrbisK (@OrbisK)
- Anthony Fu (@antfu)
- Martins (@martinszeltins)
- Anthony Aslangul (@toyi)
- Mehmet (@productdevbook)
- Mostafa Said (@MooseSaeed)
- Alex Liu (@Mini-ghost)
- Adam DeHaven (@adamdehaven)
- Harlan Wilton (@harlan-zw)
- Alexander Lichter (@manniL)
- k-karen (@k-karen)
- Ryota Watanabe (@wattanx)
- Antoine Zanardi (@antoinezanardi)
- Sultanov Mirjamol (@cljamal)
- Bogdan Kostyuk (@logotip4ik)
- Divine (@divine)
- Horváth Bálint (@horvbalint)
- i-udas (@i-udas)
- təəna.vuə (@franklin-tina)
- Andre van Tonder (@drevantonder)
- Maxime Pauvert (@maximepvrt)
- Oumar Barry (@oumarbarry)
- Sébastien Chopin (@Atinux)
- Francesco Scutellaro (@noppytinto)
- gangan (@shinGangan)
- Andrea Basile (@Evobaso-J)
- Till Sanders (@tillsanders)
- Michael Brevard (@GalacticHypernova)
- Victor Ribeiro (@ojvribeiro)
v3.10.3 (2024-02-22)
> 3.10.3 is a regularly-scheduled patch release.
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
nuxi upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the vue and unjs ecosystems.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.10.2...v3.10.3)
### 🩹 Fixes
- **nuxt:** Respect `dedupe` option in `useFetch` ([#25815](https://github.com/nuxt/nuxt/pull/25815))
- **nuxt:** Bypass browser cache when fetching app build id ([#25813](https://github.com/nuxt/nuxt/pull/25813))
- **nuxt:** In dev, don't link `css` files with `?inline` query ([#25822](https://github.com/nuxt/nuxt/pull/25822))
- **nuxt:** Pass `external` to `navigate` in custom `` ([#25887](https://github.com/nuxt/nuxt/pull/25887))
- **nuxt:** Mark internal island components with `@__PURE__` ([#25842](https://github.com/nuxt/nuxt/pull/25842))
- **nuxt:** Use `setTimeout` before scrolling when navigating ([#25817](https://github.com/nuxt/nuxt/pull/25817))
- **nuxt:** Add missing type for `head` in `defineNuxtComponent` ([#25410](https://github.com/nuxt/nuxt/pull/25410))
- **nuxt:** Handle `undefined` paths in `resolveTrailingSlashBehavior` ([ba6a4132b](https://github.com/nuxt/nuxt/commit/ba6a4132b))
- **nuxt:** Set `to.name` to be undefined rather than deleting entirely ([4ca1ab7cf](https://github.com/nuxt/nuxt/commit/4ca1ab7cf))
### 📖 Documentation
- Enable more blocks for twoslash ([#25830](https://github.com/nuxt/nuxt/pull/25830))
- Remove `.ts` extension when adding compiled files ([#25855](https://github.com/nuxt/nuxt/pull/25855))
- Replace `callout` to new components ([#25897](https://github.com/nuxt/nuxt/pull/25897))
- Fix incorrect wording ([#25902](https://github.com/nuxt/nuxt/pull/25902))
### 🏡 Chore
- Use `nuxt.config` to enable pages for docs typecheck ([72a2e23cc](https://github.com/nuxt/nuxt/commit/72a2e23cc))
- Restore environment back to development ([3f92cf04d](https://github.com/nuxt/nuxt/commit/3f92cf04d))
- Unpin vite version 🙈 ([d326e054d](https://github.com/nuxt/nuxt/commit/d326e054d))
- **nuxt:** Use Exclude rather than Omit ([3fc4231d3](https://github.com/nuxt/nuxt/commit/3fc4231d3))
### 🤖 CI
- Typecheck code samples in docs ([#25777](https://github.com/nuxt/nuxt/pull/25777))
- Update link to stackblitz mcve page ([59dd5fd93](https://github.com/nuxt/nuxt/commit/59dd5fd93))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- Mateusz Kulpa (@mateuszkulpa)
- Jonathan Walters (@Chalks)
- Josh Layton (@jl8n)
- Julien Huang (@huang-julien)
- Damian Głowala (@DamianGlowala)
- Florent Delerue (@Flosciante)
- Alexander Lichter (@manniL)
- Anthony Fu (@antfu)
- OnlyWick (@OnlyWick)
- Michał Zarach (@michalzaq12)
- Miha Sedej (@tresko)
v3.10.2 (2024-02-14)
> 3.10.2 is a regularly-scheduled patch release.
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
nuxi upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the vue and unjs ecosystems.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.10.1...v3.10.2)
### 🩹 Fixes
- **nuxt:** Export `refreshCookie` ([#25635](https://github.com/nuxt/nuxt/pull/25635))
- **nuxt:** Allow prefetching urls with query string ([#25658](https://github.com/nuxt/nuxt/pull/25658))
- **nuxt:** Remove undefined keys in route object ([#25667](https://github.com/nuxt/nuxt/pull/25667))
- **vite:** Treat `.pcss` extension as a CSS extension ([#25673](https://github.com/nuxt/nuxt/pull/25673))
- **nuxt:** Don't check for layout/page with `` ([#25714](https://github.com/nuxt/nuxt/pull/25714))
- **vite:** Strip query strings for style chunk filenames ([#25764](https://github.com/nuxt/nuxt/pull/25764))
- **nuxt:** Inline entry styles before component styles ([#25749](https://github.com/nuxt/nuxt/pull/25749))
- **vite:** Optimise layer dependencies with vite ([#25752](https://github.com/nuxt/nuxt/pull/25752))
- **nuxt:** Don't add extra `baseURL` on server `useRequestURL` ([#25765](https://github.com/nuxt/nuxt/pull/25765))
- **schema:** Use `rootDir`, not `process.cwd`, for `modulesDir` ([#25766](https://github.com/nuxt/nuxt/pull/25766))
- **nuxt:** Only warn for `useId` if attrs were not rendered ([#25770](https://github.com/nuxt/nuxt/pull/25770))
- **kit:** Don't mutate existing component entry when overriding ([#25786](https://github.com/nuxt/nuxt/pull/25786))
### 📖 Documentation
- Fix typo in `useAsyncData` docs ([#25644](https://github.com/nuxt/nuxt/pull/25644))
- Add quotes to clarify what site title is in example ([#25669](https://github.com/nuxt/nuxt/pull/25669))
- Enable twoslash for some code snippets ([#25679](https://github.com/nuxt/nuxt/pull/25679))
- Add prepend option docs for `addComponentsDir` ([#25683](https://github.com/nuxt/nuxt/pull/25683))
- Extend auto-scanned layer directories ([#25720](https://github.com/nuxt/nuxt/pull/25720))
- Improve wording in seo docs ([#25692](https://github.com/nuxt/nuxt/pull/25692))
- Add how to debug nuxt with node inspector ([#25731](https://github.com/nuxt/nuxt/pull/25731))
-
```
### ✍️ Extending `app/router.options`
It's now possible for module authors to inject their own `router.options` files ([#24922](https://github.com/nuxt/nuxt/pull/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](https://nuxt.com/docs/guide/going-further/custom-routing#router-options).
###
Client-side Node.js support
We now support (experimentally) polyfilling key Node.js built-ins ([#25028](https://github.com/nuxt/nuxt/pull/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.
```ts
import { Buffer } from 'node:buffer'
import process from 'node:process'
```
Or provide your own polyfill, for example, inside a Nuxt plugin.
```ts
// ~/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](https://developer.mozilla.org/en-US/docs/Web/API/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](https://github.com/nuxt/nuxt/pull/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](https://nuxt.com/docs/api/utils/refresh-cookie).
### 🏥 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](https://github.com/nuxt/nuxt/pull/25259)).
* We warn (in development only) if data fetch composables are used wrongly ([#25071](https://github.com/nuxt/nuxt/pull/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](https://github.com/nuxt/nuxt/pull/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](https://github.com/nuxt/nuxt/pull/25264)).
You need to have experimental view transitions support enabled first:
```ts
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:
```vue
// ~/pages/index.vue
```
Finally, Nuxt will not apply View Transitions if the user's browser matches `prefers-reduced-motion: reduce` ([#22292](https://github.com/nuxt/nuxt/pull/22292)). You can set `viewTransition: 'always'`; it will then be up to you to respect the user's preference.
### 🏗️ Build-time route metadata
It's now possible to access routing metadata defined in `definePageMeta` at build-time, allowing modules and hooks to modify and change these values ([#25210](https://github.com/nuxt/nuxt/pull/25210)).
```ts
export default defineNuxtConfig({
experimental: {
scanPageMeta: true
}
})
```
Please, experiment with this and let us know how it works for you. We hope to improve performance and enable this by default in a future release so modules like `@nuxtjs/i18n` and others can provide a deeper integration with routing options set in `definePageMeta`.
### 📦 Bundler module resolution
With [#24837](https://github.com/nuxt/nuxt/pull/24837), we are now opting in to the TypeScript `bundler` resolution which should more closely resemble the actual way that we resolve subpath imports for modules in Nuxt projects.
'Bundler' module resolution is [recommended by Vue](https://github.com/vuejs/tsconfig/blob/mainz/tsconfig.json#L24-L26) and [by Vite](https://vitejs.dev/guide/performance.html#reduce-resolve-operations), but unfortunately there are still many packages that do not have the correct entries in their `package.json`.
As part of this, we opened 85 PRs across the ecosystem to test switching the default, and identified and fixed some issues.
If you need to switch off this behaviour, you can do so. However, please consider raising an issue (feel free to tag me in it) in the library or module's repo so it can be resolved at source.
```ts
export default defineNuxtConfig({
future: {
typescriptBundlerResolution: false
}
})
```
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
nuxi upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
-->
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.9.3...v3.10.0)
### 🚀 Enhancements
- **nuxt:** `tryUseNuxtApp` composable ([#25031](https://github.com/nuxt/nuxt/pull/25031))
- **nuxt:** Add experimental sharedPrerenderData option ([#24894](https://github.com/nuxt/nuxt/pull/24894))
- **schema:** Default to `bundler` module resolution ([#24837](https://github.com/nuxt/nuxt/pull/24837))
- **nuxt:** Warn if data fetch composables are used wrongly ([#25071](https://github.com/nuxt/nuxt/pull/25071))
- **nuxt:** Add `pages:routerOptions` hook ([#24922](https://github.com/nuxt/nuxt/pull/24922))
- Experimental client-side Node.js compatibility ([#25028](https://github.com/nuxt/nuxt/pull/25028))
- **nuxt:** Throw error if `setInterval` is used on server ([#25259](https://github.com/nuxt/nuxt/pull/25259))
- **nuxt:** `refreshCookie` + experimental CookieStore support ([#25198](https://github.com/nuxt/nuxt/pull/25198))
- **nuxt:** Allow controlling view transitions in page meta ([#25264](https://github.com/nuxt/nuxt/pull/25264))
- **nuxt:** Slow down loading indicator when approaching 100% ([#25119](https://github.com/nuxt/nuxt/pull/25119))
- **nuxt:** Experimentally extract route metadata at build time ([#25210](https://github.com/nuxt/nuxt/pull/25210))
- **nuxt:** `useId` composable ([#23368](https://github.com/nuxt/nuxt/pull/23368))
### 🔥 Performance
- **vite:** Avoid `endsWith` when checking for whitespace ([#24746](https://github.com/nuxt/nuxt/pull/24746))
### 🩹 Fixes
- **nuxt:** Disable View Transitions if `prefers-reduced-motion` ([#22292](https://github.com/nuxt/nuxt/pull/22292))
- **nuxt:** Add declaration file with correct node16 imports ([#25266](https://github.com/nuxt/nuxt/pull/25266))
- **nuxt:** Allow omitting `fallback` in island response ([#25296](https://github.com/nuxt/nuxt/pull/25296))
- **schema:** Remove `defineModel` option as it is now stable ([#25306](https://github.com/nuxt/nuxt/pull/25306))
- **nuxt:** Overwrite island payload instead of merging ([#25299](https://github.com/nuxt/nuxt/pull/25299))
- **vite:** Pass `hidden` sourcemap values to vite ([#25329](https://github.com/nuxt/nuxt/pull/25329))
- **nuxt:** Use named import for lazy components ([#25286](https://github.com/nuxt/nuxt/pull/25286))
- **nuxt:** Deprecate boolean values for `dedupe` ([#25334](https://github.com/nuxt/nuxt/pull/25334))
- **nuxt:** Use default export for raw components ([#25282](https://github.com/nuxt/nuxt/pull/25282))
- **nuxt:** Handle plugin dependencies with mixed load state ([#25318](https://github.com/nuxt/nuxt/pull/25318))
- **nuxt:** Preserve `instance.attrs` in client-only components ([#25381](https://github.com/nuxt/nuxt/pull/25381))
- **nuxt:** Stop tracking suspense when error hydrating page ([#25389](https://github.com/nuxt/nuxt/pull/25389))
- **nuxt:** Add router.options files in definite order ([#25397](https://github.com/nuxt/nuxt/pull/25397))
- **nuxt:** Do not rerun synchronous `callOnce` callbacks ([#25431](https://github.com/nuxt/nuxt/pull/25431))
- **nuxt:** Remove dynamic `nuxt-client` within template code ([#25464](https://github.com/nuxt/nuxt/pull/25464))
- **nuxt:** Add runtime check to filter plugins in `dependsOn` ([#25409](https://github.com/nuxt/nuxt/pull/25409))
- **nuxt:** Improve global/payload error type with `NuxtError` ([#25398](https://github.com/nuxt/nuxt/pull/25398))
- **vite:** Extract styles for shared chunks ([#25455](https://github.com/nuxt/nuxt/pull/25455))
- **nuxt:** Avoid `vue-router` warning with routeRule redirect ([#25391](https://github.com/nuxt/nuxt/pull/25391))
- **nuxt:** Improve return type of `useRequestEvent` ([#25480](https://github.com/nuxt/nuxt/pull/25480))
- **nuxt:** Match nitro + nuxt `useRuntimeConfig` signatures ([#25440](https://github.com/nuxt/nuxt/pull/25440))
- **nuxt:** Prevent initial scroll jump when loading page ([#25483](https://github.com/nuxt/nuxt/pull/25483))
- **nuxt:** Prioritise later items in `pages:routerOptions` hook ([#25509](https://github.com/nuxt/nuxt/pull/25509))
### 💅 Refactors
- **nuxt:** Remove `currentRoute` non-ref warning ([#25337](https://github.com/nuxt/nuxt/pull/25337))
### 📖 Documentation
- Explain how to auto-install git layer deps ([#24250](https://github.com/nuxt/nuxt/pull/24250))
- Fix eslint link ([87641c867](https://github.com/nuxt/nuxt/commit/87641c867))
- Fix typo ([#25326](https://github.com/nuxt/nuxt/pull/25326))
- **nuxt:** Add `@since` annotations to exported composables ([#25086](https://github.com/nuxt/nuxt/pull/25086))
- Add emphasis to `useAsyncData` explanation ([#25392](https://github.com/nuxt/nuxt/pull/25392))
- Add separate docs page for `error.vue` ([#25320](https://github.com/nuxt/nuxt/pull/25320))
- Add explanation about layout usage in `error.vue` ([#25396](https://github.com/nuxt/nuxt/pull/25396))
- Use `.cjs` extension for `ecosystem.config` ([#25459](https://github.com/nuxt/nuxt/pull/25459))
- Add fuller explanation in `routeRules` example of swr/isr ([#25436](https://github.com/nuxt/nuxt/pull/25436))
- Warn that island client components don't support slots ([#25454](https://github.com/nuxt/nuxt/pull/25454))
- Updated addPluginTemplate example to add filename property ([#25468](https://github.com/nuxt/nuxt/pull/25468))
- Update link to vercel edge network overview ([e01fb7ac3](https://github.com/nuxt/nuxt/commit/e01fb7ac3))
- Remove unnecessary warning on `sharedPrerenderData` ([b0f50bec1](https://github.com/nuxt/nuxt/commit/b0f50bec1))
- Add more documentation for `pages:routerOptions` ([46b533671](https://github.com/nuxt/nuxt/commit/46b533671))
### 🏡 Chore
- Fix typo in warning log ([#25265](https://github.com/nuxt/nuxt/pull/25265))
- **nuxt:** Warn if `NuxtPage` is not used when pages enabled ([#25490](https://github.com/nuxt/nuxt/pull/25490))
- Remove extra 'not' in warning message ([b96fe1ece](https://github.com/nuxt/nuxt/commit/b96fe1ece))
### ✅ Tests
- **nuxt:** Add test for `data-island-uid` replacement ([#25346](https://github.com/nuxt/nuxt/pull/25346))
- Remove miswritten test ([#25347](https://github.com/nuxt/nuxt/pull/25347))
- Avoid explicit timeouts ([#25395](https://github.com/nuxt/nuxt/pull/25395))
### 🤖 CI
- Only release from main repo ([#25354](https://github.com/nuxt/nuxt/pull/25354))
- Label pull request based on type in title ([#25404](https://github.com/nuxt/nuxt/pull/25404))
- Wrap PR base label in quotes ([#25432](https://github.com/nuxt/nuxt/pull/25432))
- Update extracting PR labels' names ([#25437](https://github.com/nuxt/nuxt/pull/25437))
- Skip adding PR labels if there are none to add ([#25475](https://github.com/nuxt/nuxt/pull/25475))
- Update changelog with github tags/handles of users ([60ab5deb0](https://github.com/nuxt/nuxt/commit/60ab5deb0))
- Import `$fetch` ([a1fb399eb](https://github.com/nuxt/nuxt/commit/a1fb399eb))
### ❤️ Contributors
- Daniel Roe (@danielroe)
- Якин Никита (@TakNePoidet)
- Nozomu Ikuta (@NozomuIkuta)
- Ivan Kalachikov (@ivan-kalachikov)
- Horváth Bálint (@horvbalint)
- kevin olson (@acidjazz)
- Michael Brevard (@GalacticHypernova)
- Enkot (@enkot)
- Damian Głowala (@DamianGlowala)
- Mostafa Said (@MooseSaeed)
- Julien Huang (@huang-julien)
- TroyanOlga (@TroyanOlga)
- Rivaland TAWOUAFO NGUTE (@caporalCode)
- Becem (@becem-gharbi)
- Shay (@shayr1)
- hitochan777 (@hitochan777)
- Luke Nelson (@luc122c)
- Alexander Lichter (@manniL)
- Sébastien Chopin (@Atinux)
- Hriteek Bista (@hriteek)
- Pooya Parsa (@pi0)
- Dominic Marcelino (@Dominic-Marcelino)
- Luke Warlow (@lukewarlow)
- Danila Rodichkin (@daniluk4000)
v3.9.3 (2024-01-17)
> 3.9.3 is a hotfix release to address a regression with CSS in development
## ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
nuxi upgrade --force
```
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the vue and unjs ecosystems.
## 👉 Changelog
[compare changes](https://github.com/nuxt/nuxt/compare/v3.9.2...v3.9.3)
### 🩹 Fixes
- **nuxt:** Render stylesheets in dev for non-islands ([#25243](https://github.com/nuxt/nuxt/pull/25243))
- **nuxt:** Don't set 2x `data-island-uid` for island children ([#25245](https://github.com/nuxt/nuxt/pull/25245))
- **nuxt:** Don't share object between raw cookie and cookie ref ([#25255](https://github.com/nuxt/nuxt/pull/25255))
### 📖 Documentation
- Corrects variable name used in comment ([#25238](https://github.com/nuxt/nuxt/pull/25238))
- Deleted an extra character ([#25248](https://github.com/nuxt/nuxt/pull/25248))
- Remove space before colon ([#25251](https://github.com/nuxt/nuxt/pull/25251))
### ✅ Tests
- Add separate suspense test suite ([#22947](https://github.com/nuxt/nuxt/pull/22947))
### ❤️ Contributors
- Danila Rodichkin (@daniluk4000)
- Anthony Fu (@antfu)
- Julien Huang (@huang-julien)
- Mustafa60x (@mustafa60x)
- Александр Дьяконов (@Holiden)
- Flowern (@FlorianWerndl)
- Daniel Roe (@danielroe)