# Source: https://nuxt.com/raw/blog/v3-6.md

# Nuxt 3.6

> Nuxt 3.6 is out, bringing performance improvements, fully static server components, better style inlining, static presets, increased type safety - and much more.

## ![SPA loading indicator](/assets/design-kit/icon-green.svg)  SPA loading indicator

If your site is served with `ssr: false` or you have disabled server-rendering on some of your pages, you might be particularly interested in the new [built-in SPA loading indicator](https://github.com/nuxt/nuxt/pull/21640).

You can now place an HTML file in `~/app/spa-loading-template.html` with some HTML you would like to use to render a loading screen that will be rendered until your app is hydrated on these pages.

<note>

In Nuxt v4 (or with `compatibilityMode: 4`), this path is now `~/spa-loading-template.html`.

</note>

👉 **By default an animated Nuxt icon is rendered**. You can completely disable this indicator by setting `spaLoadingTemplate: false` in your nuxt configuration file.

## ⚡️ Performance improvements

The first thing that happens when your app is hydrated is that your plugins run, and so we now perform [build-time optimisations on your plugins](https://github.com/nuxt/nuxt/pull/21611), meaning they do not need to be normalised or reordered at runtime.

We also include your error component JS in your main entrypoint, meaning that if an error occurs when a user has no connectivity, you can still handle it with your `~/error.vue`. (This also should decrease your total bundle size.)

👉 Compared to Nuxt 3.5.3, the minimal client bundle has decreased by ~0.7kB. Let's keep this up!

## 🔥 Fully static server components

It has been possible to use server components on static pages, but until now they would increase the payload size of your application. That is no longer true. We now store [rendered server components as separate files, which are preloaded before navigation](https://github.com/nuxt/nuxt/pull/21461).

👉 **This does rely on the new, richer JSON payload format**, so make sure you have not disabled this by setting `experimental.renderJsonPayloads` to false.

## 🎨 Better style inlining

If you're monitoring your metrics closely and have not turned off `experimental.inlineSSRStyles`, you should see more CSS inlined in your page, and a significantly external CSS file. We're now [better at deduplicating global CSS](https://github.com/nuxt/nuxt/pull/21573), particularly added by libraries like tailwind or unocss.

## 🎬 Animation controls

To give you more fine-grained control over your page/layout components, for example to create custom transitions with GSAP or other libraries, we now allow you to set [`pageRef` on `<NuxtPage>`](https://github.com/nuxt/nuxt/pull/19403) and [`layoutRef` on `<NuxtLayout>`](https://github.com/nuxt/nuxt/pull/19465). These will get passed through to the underlying DOM elements.

## ✨ Automatic 'static' preset detection

Up to now, running `nuxt generate` produced the same output on every deployment provider, but with Nuxt 3.6 we now enable [static provider presets](https://github.com/nuxt/nuxt/pull/21655) automatically. That means if you are deploying a static build (produced with `nuxt generate`) to a supported provider (currently vercel and netlify with cloudflare and github pages coming soon) we'll prerender your pages with special support for that provider.

This means we can configure any route rules (redirects/headers/etc) that do not require a server function. So you should get the best of both worlds when deploying a site that doesn't require runtime SSR. It also unblocks use of [Nuxt Image](https://github.com/nuxt/image) on Vercel (with more potential for automatic provider integration coming soon).

## 💪 Increased type safety

We now have better support for server-specific `#imports` and augmentations if you are using the new `~/server/tsconfig.json` we shipped in Nuxt 3.5. So when importing from `#imports` in your server directory, you'll get IDE auto-completion for the right import locations in Nitro, and won't see Vue auto-imports like `useFetch` that are unavailable within your server routes.

You should now also have [type support for runtime Nitro hooks](https://github.com/nuxt/nuxt/pull/21666).

Finally, we have [removed more locations where objects had a default `any` type](https://github.com/nuxt/nuxt/pull/21700). This should improve type safety within Nuxt in a number of locations where unspecified types fell back to any:

- `RuntimeConfig`
- `PageMeta`
- `NuxtApp['payload']` (accessible now from `NuxtPayload` interface)
- `ModuleMeta`

You can find out more about how to [update your code](https://github.com/nuxt/nuxt/pull/21700) if this affects you in the original PR.

## ⚗️ Nitro 2.5 built-in

This release ships with new Nitro 2.5, which has a [whole list of exciting improvements](https://github.com/unjs/nitro/releases/tag/v2.5.0) that are worth checking out.

Of particular note is experimental support for streaming, which is also enabled by a [couple of changes](https://github.com/nuxt/nuxt/pull/21665) in Nuxt itself.

## 🛠️ New tools for module authors

This release brings a number of utilities for modules authors to easily [add type templates](https://github.com/nuxt/nuxt/pull/21331) and [assert compatibility](https://github.com/nuxt/nuxt/pull/21246) with a given version of *another* module.

In addition, this release will finally unlock a new `nuxt/module-builder` mode that should improve type support for module authors. If you're a module author, you might consider following [these migration steps](https://github.com/nuxt/starter/pull/392) to try it out in the coming days.

## ✅ Upgrading

As usual, our recommendation for upgrading is to run:

```sh
npx 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.

## 📃 Full changelog

Read the full release notes on [https://github.com/nuxt/nuxt/releases/tag/v3.6.0](https://github.com/nuxt/nuxt/releases/tag/v3.6.0)