You are browsing Nuxt 2 docs. Go to Nuxt 3 docs, or learn more about Nuxt 2 Long Term Support.

リリース

Nuxt フレームワークのすべてのリリースノートを見る

A landscape image A landscape image

バージョン v3.11.1

リリース日 2024年3月18日

3.11.1 is a patch release addressing regressions in v3.11.0.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🩹 Fixes

  • nuxt: Ignore console.logs called outside event context (b3ced3d69 )
  • schema: Include ofetch in typescript.hoist defaults (#26316 )
  • nuxt: Conditionally use tsx parser (#26314 )
  • nuxt: Correct finish types and add to docs (0d9c63b82 )
  • nuxt: Ignore failures to access asyncContext in environments without it (523db1a19 )
  • nuxt: Handle failure creating BroadcastChannel (#26340 )
  • nuxt: Don't warn when injecting client-only components (#26341 )
  • nuxt: Prevent losing pages routes on prerender (#26354 )
  • nuxt: Pass undefined name when resolving trailing slash (#26358 )
  • vite: Use ssr result if it exists (#26356 )

📖 Documentation

  • Fix code block formatting for usePreviewMode (#26303 )
  • Fix confusing wording (#26301 )
  • Add note that useId must be used with single root element (401370b3a )
  • Mention <DevOnly> component in api section (#26029 )
  • Note that @nuxt/schema should be used by module authors (#26190 )
  • Add routeNameSplitter example in migration docs (#25838 )

🏡 Chore

  • nuxt: Remove unused code (#26319 )
  • Revert update github/codeql-action action (c72951b06 )

🤖 CI

  • Configure npm registry in release workflow (68f7d4df8 )

❤️ Contributors

バージョン v3.11.0

リリース日 2024年3月17日

👀 Highlights

This is possibly the last minor release before Nuxt v4, and so we've packed it full of features and improvements we hope will delight you! ✨

🪵 Better logging

When developing a Nuxt application and using console.log in your application, you may have noticed that these logs are not displayed in your browser console when refreshing the page (during server-side rendering). This can be frustrating, as it makes it difficult to debug your application. This is now a thing of the past!

Now, when you have server logs associated with a request, they will be bundled up and passed to the client and displayed in your browser console. Asynchronous context is used to track and associate these logs with the request that triggered them. (#25936 ).

For example, this code:

pages/index.vue
<script setup>
console.log('Log from index page')

const { data } = await useAsyncData(() => {
  console.log('Log inside useAsyncData')
  return $fetch('/api/test')
})
</script>

will now log to your browser console when you refresh the page:

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.

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.

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 .

💰 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 ).

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 )

<script setup lang="ts">
const { data, clear } = await useFetch('/api/test')

const route = useRoute()
watch(() => route.path, (path) => {
  if (path === '/') clear()
})
</script>

🕳️ New #teleports target

Nuxt now includes a new <div id="teleports"></div> element in your app within your <body> tag. It supports server-side teleports, meaning you can do this safely on the server:

<template>
  <Teleport to="#teleports">
    <span>
      Something
    </span>
  </Teleport>
</template>

🚦 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 ).

There's also a new page:view-transition:start hook for hooking into the View Transitions API (#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 <ClientOnly>. 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 <ClientOnly> with a fallback slot to render a skeleton loader (#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 ).

🤠 Server component bonanza

When you are using server components, you can now use the nuxt-client attribute anywhere within your tree (#25479 ).

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 ).

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 ).

!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 ), using a 'layered' prerender cache (#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 ), 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 )

You can easily configure this to revert to previous behaviour if you wish:

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 ).

There are a whole raft of other type fixes, including some regarding import types (#26218 and #25965 ) and module typings (#25548 ).

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🚀 Enhancements

  • nuxt: Server-only pages (#24954 )
  • nuxt: Client-only pages (#25037 )
  • nuxt: Allow using nuxt-client in all components (#25479 )
  • nuxt: Add page:view-transition:start hook (#26045 )
  • nuxt: Custom loading reset/hide delay + force finish() (#25932 )
  • nuxt: Emit error if <NuxtIsland> can't fetch island (#25798 )
  • nuxt: usePreviewMode composable (#21705 )
  • nuxt: Support async transforms for data composables (#26154 )
  • nuxt: Add dedicated #teleports element for ssr teleports (#25043 )
  • nuxt: Enable islands if server pages/components present (#26223 )
  • nuxt: Allow generating metadata for nuxt components (#26204 )
  • vite: Handle multiple/custom public dirs (#26163 )
  • schema: Allow configuring type hoists with typescript.hoist (85166cced )
  • nuxt: Pass nuxt instance to getCachedData (#26287 )
  • nuxt: Pass server logs to client (#25936 )
  • nuxt: Add nuxtMiddleware route rule (#25841 )
  • nuxt: Add clear utility to useAsyncData/useFetch (#26259 )

🔥 Performance

  • Early return chained functions with falsy values (#25647 )
  • nuxt: Don't check isPrerendered in dev for server page (#26061 )
  • nuxt: Use fallthrough cache for prerender (#26104 )
  • nuxt: Tree shake island renderer (8323220f7 )
  • nuxt: Skip adding selective-client code if not enabled (#26176 )
  • nuxt: Use faster approach to check cache exists (#26172 )
  • nuxt: Only update changed templates (#26250 )

🩹 Fixes

  • kit: Apply nuxt types to .config/nuxt.config (5440ecece )
  • kit: Widen pattern to .config/nuxt.* (7815aa534 )
  • nuxt: Align error in showError/createError with h3 (#25945 )
  • kit: Don't warn if middleware is added twice (08b656a04 )
  • nuxt: Don't try to strip directory file extensions (#25965 )
  • nuxt: Produce valid css selector from useId (#25969 )
  • schema: Add vueCompilerOptions property to tsConfig (#25924 )
  • nuxt: Skip vue style blocks in unctx transform (#26059 )
  • nuxt: Pass event to useRuntimeConfig in Nuxt renderer (#26058 )
  • schema: Disable typescript.shim in favour of volar (#26052 )
  • nuxt: Only check if server page is prerendered on client (#26081 )
  • nuxt: Don't refetch server components in initial html (#26089 )
  • nuxt: Resolve defu/h3 paths in type templates (#26085 )
  • nuxt: Use exported toExports from unimport (#26086 )
  • nuxt: Cache-bust payloads with build id (#26068 )
  • nuxt: Export AsyncDataRequestStatus type (#26023 )
  • nuxt: Add space before <html> and <body> attrs (#26027 )
  • kit: Resolve module node_modules for modulesDir (#25548 )
  • nuxt: Handle external redirects from routeRules (#26120 )
  • nuxt: Use flat cache directory for prerender data (47cdd7dd0 )
  • nuxt: Watch custom cookieRef values deeply (#26151 )
  • nuxt: Access prerender cache synchronously (#26146 )
  • nuxt: Provide typescript aliases for core packages (#26158 )
  • nuxt: Handle errors resolving package paths (63bfaac12 )
  • kit: Handle errors resolving module path (3782ac0a2 )
  • nuxt: Clone paths to prevent shared object (264bf9833 )
  • nuxt: Detect component usage within ssrRender (#26162 )
  • nuxt: Improved plugin annotating warnings (#26193 )
  • nuxt: Generate typed routes after pages are scanned (#26206 )
  • nuxt: Only strip supported extensions when generating import types (#26218 )
  • nuxt: Init payload when using islands with ssr: false (f080c426a )
  • nuxt: Register/scan plugins with jsx/tsx extensions (#26230 )
  • nuxt: Update auto imports after other templates (#26249 )
  • nuxt: Respect baseUrl within server components (#25727 )
  • nuxt: Access shared asyncData state with useNuxtData (#22277 )
  • vite: Explicitly import publicAssetsURL (9d08cdfd1 )
  • nuxt: Don't ignore any files from buildAssetsDir (81933dfc3 )
  • vite: Drop name prefix for client chunk file names (#26203 )
  • kit: Clone middleware when adding to app (5be9253cf )
  • nuxt: Don't generate separate chunk for stubs (#26291 )
  • nuxt: Use joinRelativeURL for build assets (#26282 )
  • schema: Allow passing deep to selectiveClient (357f8db41 )
  • schema: Don't hoist types for consola for now (adbd53a25 )
  • nuxt: Guard window access more carefully (977377777 )
  • nuxt: Provide appMiddleware types with universal router (87c0678f9 )
  • nuxt: Handle nightly releases for hoisted types (3c7e68c84 )

💅 Refactors

  • nuxt: Simplify request computation (#26191 )
  • nuxt: Rename nuxtMiddleware to appMiddleware (cac745470 )
  • nuxt: Use addTypeTemplate for page augmentations (4925670dc )
  • nuxt: Use addTypeTemplate in more places (33ce71dd1 )

📖 Documentation

  • Mention when useId composable was introduced (#25953 )
  • Add domEnvironment option to testing example (#25972 )
  • Update VS Code settings (#25985 )
  • Mention island features are SFC only (#26013 )
  • Improve pick and transform doc (#26043 )
  • Fix 404 link (8e6d2306c )
  • Add Nuxt Fonts to changelog (#26077 )
  • Update roadmap (#26072 )
  • Document fallback prop for <NuxtLayout> (#26091 )
  • Add documentation for using layers with private repos (#26094 )
  • Remove twoslash from code sample (0bf70bd7a )
  • Update cssnano website url (d6edb30c5 )
  • Add warning about latest vue-tsc (#26083 )
  • Improve readme readability (#26118 )
  • Added bridge macros.pageMeta and typescript.esbuild option (#26136 )
  • Fix bracket escape on definePageMeta page (#26139 )
  • Add app:manifest:update hook (#26192 )
  • Add cache.varies docs for multi-tenant use case (#26197 )
  • Add mentions on Vue School tutorials (#25997 )
  • Update link to zhead (e889a7df5 )
  • Added modular architecture use case for Layers (#26240 )
  • Escape 'elements' in jsdoc comments (5c6dc4c14 )
  • Use a more common word (#26276 )
  • Split a sentence in two to improve readability (#26279 )
  • Removed unused composable example (#26283 )
  • Add more keywords for reducer/reviver docs (6b1f3438b )
  • Link to pinceau repo rather than website (#26286 )
  • Add link to ofetch repo (#26284 )
  • Improve section titles in error-handling docs (#26288 )
  • Add example for clear (24217a992 )
  • Add docs about playwright runner support (115298a44 )
  • Add some appMiddleware docs (da8e8eba8 )

🏡 Chore

✅ Tests

  • Use retryable assertion for scrollY (#26298 )
  • Also run composables test with appManifest off (205d0e2fa )
  • Remove wait for networkidle (9b5bffbbb )
  • Use locator assertion for body text (3d77e267d )
  • Use function assertion for second scrollY test (d981c056d )
  • Add type test for appMiddleware route rules (70669012f )

🤖 CI

  • Clean up pr cache when it is merged (#25873 )
  • Skip checking stackoverflow link (0a8c3444a )
  • Fix lychee configuration (375bd64c5 )
  • Run lint step after bundle test (c3c9c4b2a )
  • Release in ci when a v3 tag is pushed (c78c1161a )
  • Do not cache Playwright browsers (#26296 )

❤️ Contributors

バージョン v3.10.3

リリース日 2024年2月22日

3.10.3 is a regularly-scheduled patch release.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🩹 Fixes

  • nuxt: Respect dedupe option in useFetch (#25815 )
  • nuxt: Bypass browser cache when fetching app build id (#25813 )
  • nuxt: In dev, don't link css files with ?inline query (#25822 )
  • nuxt: Pass external to navigate in custom <NuxtLink> (#25887 )
  • nuxt: Mark internal island components with @__PURE__ (#25842 )
  • nuxt: Use setTimeout before scrolling when navigating (#25817 )
  • nuxt: Add missing type for head in defineNuxtComponent (#25410 )
  • nuxt: Handle undefined paths in resolveTrailingSlashBehavior (ba6a4132b )
  • nuxt: Set to.name to be undefined rather than deleting entirely (4ca1ab7cf )

📖 Documentation

  • Enable more blocks for twoslash (#25830 )
  • Remove .ts extension when adding compiled files (#25855 )
  • Replace callout to new components (#25897 )
  • Fix incorrect wording (#25902 )

🏡 Chore

  • Use nuxt.config to enable pages for docs typecheck (72a2e23cc )
  • Restore environment back to development (3f92cf04d )
  • Unpin vite version 🙈 (d326e054d )
  • nuxt: Use Exclude rather than Omit (3fc4231d3 )

🤖 CI

  • Typecheck code samples in docs (#25777 )
  • Update link to stackblitz mcve page (59dd5fd93 )

❤️ Contributors

バージョン v3.10.2

リリース日 2024年2月14日

3.10.2 is a regularly-scheduled patch release.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🩹 Fixes

  • nuxt: Export refreshCookie (#25635 )
  • nuxt: Allow prefetching urls with query string (#25658 )
  • nuxt: Remove undefined keys in route object (#25667 )
  • vite: Treat .pcss extension as a CSS extension (#25673 )
  • nuxt: Don't check for layout/page with <ClientOnly> (#25714 )
  • vite: Strip query strings for style chunk filenames (#25764 )
  • nuxt: Inline entry styles before component styles (#25749 )
  • vite: Optimise layer dependencies with vite (#25752 )
  • nuxt: Don't add extra baseURL on server useRequestURL (#25765 )
  • schema: Use rootDir, not process.cwd, for modulesDir (#25766 )
  • nuxt: Only warn for useId if attrs were not rendered (#25770 )
  • kit: Don't mutate existing component entry when overriding (#25786 )

📖 Documentation

  • Fix typo in useAsyncData docs (#25644 )
  • Add quotes to clarify what site title is in example (#25669 )
  • Enable twoslash for some code snippets (#25679 )
  • Add prepend option docs for addComponentsDir (#25683 )
  • Extend auto-scanned layer directories (#25720 )
  • Improve wording in seo docs (#25692 )
  • Add how to debug nuxt with node inspector (#25731 )
  • Add missing export defaults for nuxt config (#25774 )
  • Add import statement for mountSuspended (#25783 )
  • Pass event to useRuntimeConfig (#25788 )

🏡 Chore

  • schema: Add missing closing code block (#25641 )

❤️ Contributors

バージョン v3.10.1

リリース日 2024年2月5日

3.10.1 is a regularly-scheduled patch release.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🔥 Performance

  • nuxt: Clear route meta build cache when pages change (#25514 )

🩹 Fixes

  • nuxt: Fix syntax error when serializing route meta (#25515 )
  • nuxt: Only request animation frame on client (#25569 )
  • schema: Correctly set value for app.viewTransition (#25581 )
  • nuxt: Correct return type of refresh functions (#25568 )
  • nuxt: Broadcast cookie change in correct format (#25598 )
  • nuxt: Generate typed route declarations when building (#25593 )
  • nuxt: Remove key from useId type signature (#25614 )
  • nuxt: Remove $ from generated id in useId (#25615 )
  • nuxt: Don't set default rel for same-site external links (#25600 )
  • nuxt: Warn if inheritAttrs: false when using useId (#25616 )
  • nuxt: Fetch non-server rendered islands when hydrating (#25613 )
  • nuxt: Don't check page/layout usage when redirecting (#25628 )

💅 Refactors

  • nuxt: Improve NuxtLink types (#25599 )

📖 Documentation

  • Correct typo (#25523 )
  • Add and link to a section on Nuxt context (#23546 )
  • Explain how to set <NuxtLink> defaults in nuxt config (#25610 )

🏡 Chore

  • Use pathe in internal tests (e33cec958 )
  • nuxt: Rename nuxt -> nuxtApp internally for consistency (c5d5932f5 )

🤖 CI

  • Fix playwright cache (#25527 )
  • Retry flaky test when running in Windows with Webpack (#25536 )
  • Retry flaky test when running in Windows with Webpack (#25543 )
  • Retry flaky test when using Webpack (#25550 )
  • Simplify label PR workflow (#25579 )

❤️ Contributors

バージョン v3.10.0

リリース日 2024年1月30日

3.10.0 is the next minor/feature release.

👀 Highlights

v3.10 comes quite close on the heels of v3.9, but it's packed with features and fixes. Here are a few highlights.

✨ Experimental shared asyncData when prerendering

When prerendering routes, we can end up refetching the same data over and over again. In Nuxt 2 it was possible to create a 'payload' which could be fetched once and then accessed in every page (and this is of course possible to do manually in Nuxt 3 - see this article ).

With #24894 , we are now able to do this automatically for you when prerendering. Your useAsyncData and useFetch calls will be deduplicated and cached between renders of your site.

nuxt.config.ts
export defineNuxtConfig({ 
  experimental: { 
    sharedPrerenderData: true
  } 
}) 

!IMPORTANT
It is particularly important to make sure that any unique key of your data is always resolvable to the same data. For example, if you are using useAsyncData to fetch data related to a particular page, you should provide a key that uniquely matches that data. (useFetch should do this automatically.)

👉 See full documentation .

🆔 SSR-safe accessible unique ID creation

We now ship a useId composable for generating SSR-safe unique IDs (#23368 ). This allows creating more accessible interfaces in your app. For example:

components/MyForm.vue
<script setup>
const emailId = useId()
const passwordId = useId()
</script>

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

✍️ Extending app/router.options

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

👉 See full documentation .

Client-side Node.js support

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

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

import { Buffer } from 'node:buffer'
import process from 'node:process'

Or provide your own polyfill, for example, inside a Nuxt plugin.

// ~/plugins/node.client.ts
import { Buffer } from 'node:buffer'
import process from 'node:process'

globalThis.Buffer = Buffer
globalThis.process = process

export default defineNuxtPlugin({})

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

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

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

🏥 Detecting anti-patterns

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

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

🧂 Granular view transitions support

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

You need to have experimental view transitions support enabled first:

export default defineNuxtConfig({
  experimental: {
    viewTransition: true
  },
  app: {
    // you can disable them globally if necessary (they are enabled by default)
    viewTransition: false
  }
})

And you can opt in/out granularly:

// ~/pages/index.vue
<script setup lang="ts">
definePageMeta({
  viewTransition: false
})
</script>

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

🏗️ Build-time route metadata

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 ).

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 , 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 and by Vite , 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.

export default defineNuxtConfig({
  future: {
    typescriptBundlerResolution: false
  }
})

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🚀 Enhancements

  • nuxt: tryUseNuxtApp composable (#25031 )
  • nuxt: Add experimental sharedPrerenderData option (#24894 )
  • schema: Default to bundler module resolution (#24837 )
  • nuxt: Warn if data fetch composables are used wrongly (#25071 )
  • nuxt: Add pages:routerOptions hook (#24922 )
  • Experimental client-side Node.js compatibility (#25028 )
  • nuxt: Throw error if setInterval is used on server (#25259 )
  • nuxt: refreshCookie + experimental CookieStore support (#25198 )
  • nuxt: Allow controlling view transitions in page meta (#25264 )
  • nuxt: Slow down loading indicator when approaching 100% (#25119 )
  • nuxt: Experimentally extract route metadata at build time (#25210 )
  • nuxt: useId composable (#23368 )

🔥 Performance

  • vite: Avoid endsWith when checking for whitespace (#24746 )

🩹 Fixes

  • nuxt: Disable View Transitions if prefers-reduced-motion (#22292 )
  • nuxt: Add declaration file with correct node16 imports (#25266 )
  • nuxt: Allow omitting fallback in island response (#25296 )
  • schema: Remove defineModel option as it is now stable (#25306 )
  • nuxt: Overwrite island payload instead of merging (#25299 )
  • vite: Pass hidden sourcemap values to vite (#25329 )
  • nuxt: Use named import for lazy components (#25286 )
  • nuxt: Deprecate boolean values for dedupe (#25334 )
  • nuxt: Use default export for raw components (#25282 )
  • nuxt: Handle plugin dependencies with mixed load state (#25318 )
  • nuxt: Preserve instance.attrs in client-only components (#25381 )
  • nuxt: Stop tracking suspense when error hydrating page (#25389 )
  • nuxt: Add router.options files in definite order (#25397 )
  • nuxt: Do not rerun synchronous callOnce callbacks (#25431 )
  • nuxt: Remove dynamic nuxt-client within template code (#25464 )
  • nuxt: Add runtime check to filter plugins in dependsOn (#25409 )
  • nuxt: Improve global/payload error type with NuxtError (#25398 )
  • vite: Extract styles for shared chunks (#25455 )
  • nuxt: Avoid vue-router warning with routeRule redirect (#25391 )
  • nuxt: Improve return type of useRequestEvent (#25480 )
  • nuxt: Match nitro + nuxt useRuntimeConfig signatures (#25440 )
  • nuxt: Prevent initial scroll jump when loading page (#25483 )
  • nuxt: Prioritise later items in pages:routerOptions hook (#25509 )

💅 Refactors

  • nuxt: Remove currentRoute non-ref warning (#25337 )

📖 Documentation

  • Explain how to auto-install git layer deps (#24250 )
  • Fix eslint link (87641c867 )
  • Fix typo (#25326 )
  • nuxt: Add @since annotations to exported composables (#25086 )
  • Add emphasis to useAsyncData explanation (#25392 )
  • Add separate docs page for error.vue (#25320 )
  • Add explanation about layout usage in error.vue (#25396 )
  • Use .cjs extension for ecosystem.config (#25459 )
  • Add fuller explanation in routeRules example of swr/isr (#25436 )
  • Warn that island client components don't support slots (#25454 )
  • Updated addPluginTemplate example to add filename property (#25468 )
  • Update link to vercel edge network overview (e01fb7ac3 )
  • Remove unnecessary warning on sharedPrerenderData (b0f50bec1 )
  • Add more documentation for pages:routerOptions (46b533671 )

🏡 Chore

  • Fix typo in warning log (#25265 )
  • nuxt: Warn if NuxtPage is not used when pages enabled (#25490 )
  • Remove extra 'not' in warning message (b96fe1ece )

✅ Tests

  • nuxt: Add test for data-island-uid replacement (#25346 )
  • Remove miswritten test (#25347 )
  • Avoid explicit timeouts (#25395 )

🤖 CI

  • Only release from main repo (#25354 )
  • Label pull request based on type in title (#25404 )
  • Wrap PR base label in quotes (#25432 )
  • Update extracting PR labels' names (#25437 )
  • Skip adding PR labels if there are none to add (#25475 )
  • Update changelog with github tags/handles of users (60ab5deb0 )
  • Import $fetch (a1fb399eb )

❤️ Contributors

バージョン v3.9.3

リリース日 2024年1月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:

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

🩹 Fixes

  • nuxt: Render stylesheets in dev for non-islands (#25243 )
  • nuxt: Don't set 2x data-island-uid for island children (#25245 )
  • nuxt: Don't share object between raw cookie and cookie ref (#25255 )

📖 Documentation

  • Corrects variable name used in comment (#25238 )
  • Deleted an extra character (#25248 )
  • Remove space before colon (#25251 )

✅ Tests

  • Add separate suspense test suite (#22947 )

❤️ Contributors

バージョン v3.9.2

リリース日 2024年1月16日

3.9.2 is a regularly scheduled patch release.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🔥 Performance

  • nuxt: Iterate rather than using Object.fromEntries (#24953 )

🩹 Fixes

  • nuxt: Add missing script blocks before island transform (#25148 )
  • kit: Improve types for options in addTemplate (#25109 )
  • nuxt: Apply more import protections for nitro runtime (#25162 )
  • nuxt: Sort pages/ files in en-US locale (#25195 )
  • nuxt: Check for layout after nextTick (#25197 )
  • nuxt: Set nitro log level to match nuxt options (#25213 )
  • nuxt: Await async payload revivers (#25222 )
  • nuxt: Render user-inserted links in island responses (#25219 )

💅 Refactors

  • nuxt: Refactor island response + improve rendering (#25190 )
  • nuxt: Rename to data-island-component (#25232 )

📖 Documentation

  • Correct nuxt image discussion link (#25090 )
  • Fix typo (#25100 )
  • Suggest using <NuxtPage> rather than <RouterView> (#25106 )
  • Fix typo (#25127 )
  • Add demo for view transitions api (3c5ea3457 )
  • Remove reference to @nuxt/bridge-edge (3f09ddc31 )
  • Remove bridge recommendation only relevant Vue <= 2.6.14 (7bb90f587 )
  • Bump nuxt 2 version (98fb2be07 )
  • Remove invalid nuxi aliases (#25209 )
  • Add --log-level description (#25211 )
  • Added immediate: false in the appropriate example (#25224 )
  • Mention .global.vue filename for global components (#25144 )
  • Clarify reactivity in composables directory (#23731 )
  • Remove lagon from deployment providers (#24955 )
  • Add eslint setup guide (#24976 )
  • Add information on custom path regexp in definePageMeta (#25073 )
  • Fix addDevServerHandler API (#25233 )
  • Mention installing nuxi for bridge (637f5622d )

🏡 Chore

  • Use v3 branch sandbox in issue template (#25174 )

❤️ Contributors

バージョン v3.9.1

リリース日 2024年1月5日

3.9.1 is a regularly scheduled patch release.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🔥 Performance

  • nuxt: Avoid multiple iterations in useRequestHeaders (#24853 )
  • kit,schema,nuxt: Refactor startsWith to array access (#24744 )
  • nuxt: Use single iteration when normalising routes (#24946 )
  • nuxt: Remove some line breaks when rendering html (#24888 )

🩹 Fixes

  • nuxt: Catch error in NuxtErrorBoundary with ssr: false (#24896 )
  • kit: Show correct error when module can't be loaded (#24957 )
  • nuxt: Deeply watch island props (#24986 )
  • nuxt: Don't show transition on initial page load (#24935 )
  • nuxt: Clone cookie to detect changes within object (#25007 )
  • nuxt: Do not warn about missing layouts on error page (#25008 )
  • nuxt: Ignore plugins typed as any in inferred injections (#25010 )
  • nuxt: Reuse intermediate setup state in <ClientOnly> (#25009 )
  • nuxt: Skip scanning layout/middleware without name (#25015 )
  • nuxt: Wrap universal router currentRoute in Ref (#25026 )
  • nuxt: Stop loading indicator if page keys are the same (#24931 )

💅 Refactors

  • nuxt: Remove old reference to nuxt-config-schema (#25067 )

📖 Documentation

  • Switch features/future docs (f5676fba5 )
  • Corrected json syntax in 7.esm.md (#24937 )
  • Specify yarn pnp opt-out for install (#24923 )
  • Capitalise hash for vue-router docs link (#24948 )
  • Add badge for callOnce utility (792cf6713 )
  • Warn about hydration issue with URL fragment (#24961 )
  • Mention readValidatedBody and getValidatedQuery (#24990 )
  • Add missing imports for nitro examples (#25003 )
  • Add an example of provide with object syntax plugins (#24993 )
  • Update EOL date for Nuxt 2 (afbc4080b )
  • Add callout for getValidatedRouterParams (#25057 )
  • Warn about ref unwrapping when providing refs from plugin (#25054 )

🏡 Chore

  • Add bullet for adding tests in pr template (2bda817ea )

✅ Tests

  • Add missing payload checks (#24899 )
  • Start listening for requests earlier (#24985 )

❤️ Contributors

バージョン v3.9.0

リリース日 2023年12月25日

3.9.0 is the next minor release.

👀 Highlights

A very merry Christmas to you and yours from all Nuxters involved in this release! 🎁🎄

We have lots of features packed into v3.9.0 and can't wait for you to try them out.

⚡️ Vite 5

This release comes with Vite 5 and Rollup 4 support. Module authors may need to check to ensure that any vite plugins you're creating are compatible with these latest releases.

This comes with a whole host of great improvements and bug fixes - check out the Vite changelog for more info.

✨ Vue 3.4 ready

This release is tested with the latest Vue 3.4 release candidate, and has the necessary configuration to take advantage of new features in Vue 3.4 , including debugging hydration errors in production (just set debug: true) in your Nuxt config.

👉 To take advantage, just update your vue version once v3.4 is released, or try out the release candidate today:

{
  "dependencies": {
    "nuxt": "3.9.0",
    "vue": "3.4.0-rc.1",
    "vue-router": "latest"
  }
}

🏝️ Interactive Server Components

This is a highly-experimental update, but it's now possible to play around with interactive components within Nuxt server components. You'll need to enable this new feature additionally to component islands:

export default defineNuxtConfig({
  experimental: {
    componentIslands: {
      selectiveClient: true
    }
  }
})

Now, within a server component, you can specify components to hydrate by using the nuxt-client directive:

<NuxtLink :to="/" nuxt-client />

We're pretty excited about this one - so do let us know how you're using it! 🙏

🔥 Automatic Server Optimisations

We now use Vite's new AST-aware 'define' to perform more accurate replacements on server-side code, meaning code like this will no longer throw an error:

<script setup lang="ts">
if (document) {
  console.log(document.querySelector('div'))
}
</script>

This hasn't been possible until now because we haven't wanted to run the risk of accidentally replacing normal words like document within non-JS parts of your apps. But Vite's new define functionality is powered by esbuild and is syntax-aware, so we feel confident in enabling this functionality. Nevertheless, you can opt out if you need to:

export default defineNuxtConfig({
  hooks: {
    'vite:extendConfig' (config) {
      delete config.define!.document
    }
  }
})

🚦 Granular Loading API

We now have a new hook-based system for <NuxtLoadingIndicator>, including a useLoadingIndicator composable that lets you control/stop/start the loading state. You can also hook into page:loading:start and page:loading:end if you prefer.

You can read more in the docs and in the original PR (#24010 ).

🏁 Run single events in callOnce

Sometimes you only want to run code once, no matter how many times you load a page - and you don't want to run it again on the client if it ran on the server.

For this, we have a new utility: callOnce (#24787 ).

<script setup>
const websiteConfig = useState('config')

await callOnce(async () => {
  console.log('This will only be logged once')
  websiteConfig.value = await $fetch('https://my-cms.com/api/website-config')
})
</script>

Note that this utility is context-aware so it must be called in component setup function or Nuxt plugin, as with other Nuxt composables.

Read more in the docs .

🚨 Error Types

For a while now, errors returned by useAsyncData and useFetch have been typed pretty generically as Error. We've significantly improved the type possibilities for them to make them more accurate in terms of what you'll actually receive. (We normalise errors with the h3 createError utility under the hood, so they can be serialised from server to client, for example.)

We've tried to implement the type change in a backwards compatible way, but you might notice that you need to update the generic if you're manually configuring the generics for these composables. See (#24396 ) for more information, and do let us know if you experience any issues.

🔥 Schema Performance

We've taken some time in this release to make some minor performance improvements, so you should notice some things are a bit faster. This is an ongoing project and we have ideas for improving initial load time of the Nuxt dev server.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🚀 Enhancements

  • nuxt: Warn when page uses a layout without <NuxtLayout> (#24116 )
  • kit: Support prepend option for addComponentsDir (#24309 )
  • kit: Allow customising logger options (#24243 )
  • nuxt: Allow readonly option for useCookie (#24503 )
  • nuxt: Add path to error.data when throwing 404 errors (#24674 )
  • kit: Load /module or /nuxt module subpath if it exists (#24707 )
  • nuxt: Layers support for spa loading template (#24709 )
  • nuxt: Expose refresh on islands and server components (#24261 )
  • nuxt: Add dedupe option for data fetching composables (#24564 )
  • vite: Replace browser globals with undefined on server (#24711 )
  • nuxt: Allow plugins to specify dependencies (#24127 )
  • kit: Add new addServerScanDir composable (#24001 )
  • nuxt: Transform setup within defineComponent options (#24515 )
  • nuxt: Allow customising fallback layout (#24777 )
  • nuxt: useRequestHeader utility (#24781 )
  • nuxt: Move loading api behind hooks (#24010 )
  • nuxt: Add callOnce util to allow running code only once (#24787 )
  • nuxt: Allow client components within NuxtIsland (#22649 )
  • schema: Default to bundler module resolution (#22821 )
  • kit,nuxt,vite,webpack: Add toArray util (#24857 )

🔥 Performance

  • vite: Avoid duplicate resolve operation (#24736 )
  • nuxt: Avoid duplicate iterations over layers (#24730 )
  • kit: Avoid duplicate join operation (#24717 )
  • vite: Simplify manifest property acccess (#24715 )
  • nuxt: Don't dedupe fewer than two middleware/plugins (#24718 )
  • schema: Avoid duplicate get operations (#24734 )
  • schema: Use parallel promises (#24771 )
  • nuxt: Avoid duplicate useRuntimeConfig call (#24843 )
  • vite: Avoid duplicate JSON.stringify operation (#24848 )

🩹 Fixes

  • nuxt: Avoid recursive ssr errors (#24399 )
  • nuxt: Improve path resolve for import.d.ts (#24413 )
  • nuxt: Remove experimental reactivityTransform (vue 3.4) (#24477 )
  • nuxt: Ignore manifest when prerendering (#24504 )
  • nuxt: Don't strip literals from template in <DevOnly> (#24511 )
  • vite: Use isBuiltin polyfill for greater node support (#24512 )
  • nuxt: Island components with number prefix (#24469 )
  • nuxt: Use consistent annotations for tree-shaking (#24514 )
  • nuxt: Skip prerendering all pages in hash mode (#24517 )
  • nuxt: Skip router middleware/redirections for islands (#24421 )
  • nuxt: Remove trailing slash before checking if prerendered (#24516 )
  • nuxt: Skip check for <NuxtLayout> usage in islands (#24529 )
  • vite,webpack: Don't add type checker/analyzer when testing (#24608 )
  • nuxt: Do not try auto-install outside of a Nuxt context (#24605 )
  • nuxt: Merge and apply layer hooks (#24639 )
  • nuxt: Only add/remove trailing slash for http protocols (#23296 )
  • nuxt: Ensure error in useAsyncData has correct type (#24396 )
  • nuxt: Add appManifest middleware after modules run (#24786 )
  • nuxt: Revert async transform of setup within defineComponent (#24784 )
  • nuxt: Eager load island components map (#24584 )
  • nuxt: Register override hooks separately (#24833 )
  • nuxt: Add __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ (#24836 )
  • kit: Auto-detect mode from filePath for addComponent (#24835 )
  • schema: Revert bundler module resolution due to lack of support (22ce98d61 )
  • kit: Don't add local ~/modules dirs to modulesDir (#24457 )

💅 Refactors

  • nuxt: Use defineComponent to infer prop types for router-link stub (dc0e8347b )
  • nuxt: Opt-in to future jiti.import for schema (#24526 )
  • nuxt: Remove process.* usage in nuxt vue app (#24749 )
  • schema: Introduce future and features namespace (#24880 )

📖 Documentation

  • Fix typo (#24395 )
  • Update code to show how to enable typedPages (#24436 )
  • Add defineNuxtConfig to deployment example (#24451 )
  • Update link to more info about key/keepalive (1b1cc4f4e )
  • Update Nuxt 2 EOL date in roadmap (#24602 )
  • Prefer ~ to @ alias in examples (#24574 )
  • Fix typo (6a1c05401 )
  • Warn about using differently names env variables (#24612 )
  • commands: Add tunnel option (50d46f068 )
  • Add file name to code block (#24620 )
  • Remove linking to nuxt-themes org (6f44e9470 )
  • Update yarn -o option to --open (#24644 )
  • Add alt text for roadmap img tags (1f1049858 )
  • Add missing props for <NuxtPage> (#24675 )
  • Add more info about custom serialize/revive (#24680 )
  • Fix grammar (#24737 )
  • Add documentation on getCachedData option (#24697 )
  • Fix addServerScanDir example (7cd02e290 )
  • Add panda css to styling guide (#24178 )
  • Highlight the possibility of middleware to return nothing (#24241 )
  • Setting middleware at build time (#23480 )
  • Remove deprecated loadNuxt options (#24201 )
  • Improvements on data-fetching (6d50b4744 )
  • Add documentation for nuxi module (#24790 )
  • Update return for useFetch and useAsyncData #24407 (#24775 , #24407 )
  • Add docs for runtime test environment (#24658 )
  • Update example test snapshots to remove escapes (5de779a7d )
  • Add addComponentsDir example to modules author guide (#24876 )

🏡 Chore

✅ Tests

  • Re-enable accidentally disabled unit tests 🙈 (b443de230 )
  • Add basic benchmark tests (#24846 )
  • Update vitest coverage exclusions (a46b0c876 )

🤖 CI

  • Don't skip releases based on commit body (#24554 )
  • Label pull requests based on their target branch (#24468 )
  • Update options for GitHub app token generation (#24565 )
  • Notify nuxt/bridge when composables change (#24752 )
  • Don't run benchmark on main commits by default (064615e8c )
  • Temporarily disable codspeed (a39d311d3 )

❤️ Contributors

バージョン v3.8.2

リリース日 2023年11月20日

3.8.2 is a patch release focusing on bug fixes

👀 Highlights

3.8.2 is a patch release and we've deferred some exciting features in our next release (3.9.0, expected in December) but it does bring a significant Nitro minor release: v2.8.0 . It's well worth checking out the release notes.

👉 Note that as Nitro has updated to rollup v4, but as Nuxt's vite dependency is still on rollup v3 until v3.9, you may experience type mismatches in modules or your projects if you are dependent on particular rollup plugins or plugin types.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🩹 Fixes

  • vite: Skip warming up node builtins (#24162 )
  • vite: Provide default values for transformAssetUrls (#24173 )
  • nuxt: Wrap caught asyncData error in createError (#24093 )
  • nuxt: Include plugin templates in plugins.d.ts if they will be written (#23943 )
  • nuxt: Handle multi-line slots in islands (#24212 )
  • nuxt: Fix replace regex used for slots in islands SSR (#24255 )
  • vite: Use rollup replace plugin for typeof optimisations (#23903 )
  • nuxt: Provide route component names to KeepAlive cache (#24024 )
  • schema: Use scule types for runtimeConfig type hints (#23696 )
  • nuxt: Deeply unwrap headers/query for useFetch key (#24307 )
  • nuxt: Split component name case in each segment (#24318 )
  • nuxt: Do not compute useFetch key from headers (#23462 , #24333 )
  • nuxt: Set framework info for nitro (#24340 )
  • schema: Add type for ignoreOptions (#24337 )
  • nuxt: Log errors rendering islands (#24356 )
  • nuxt: Respect custom timeout in useFetch (#24364 )
  • nuxt: Use max length + iterations for useCookie timeout (#24253 )
  • nuxt: Handle errors when booting app with app:error (#24376 )

📖 Documentation

  • Remove unused import from example (#24168 )
  • Create a page explaining import.meta (#24186 )
  • Remove link to .nuxtrc in nuxt/starter (56147b4a8 )
  • Correct spelling from "opiniated" to "opinionated" (#24248 )
  • Mention new defineNuxtPlugin syntax in bridge migration (#23036 )
  • Mention nuxt3-vuex-module in migration guide (#24260 )
  • Fix links to other auto-imports pages (#24269 )
  • Remove only (#24295 )
  • Update link to deno deploy provider docs (88ee7b7ea )
  • Typos and wording tweaks for getting started section (#24319 )
  • Update .gitignore in directory structure (#24338 )
  • Add hint about app.config placement with custom srcDir (#24252 )
  • Typos and wording tweaks for guide section (#24323 )
  • Remove path for <ContentDoc> in example (#24244 )
  • Mention changing directory in installation guide (#23680 )
  • Use @nuxt/kit-nightly in example (bdedc3207 )
  • Update nuxi-edge to nuxi-nightly (#24347 )
  • Minor wording & formatting tweaks (#24349 )
  • Add AWS Amplify Hosting to hosting providers (#24371 )
  • Fix typo (#24375 )
  • Simplify to deployments page (13b93237e )
  • Update to /deploy url (751dad7d7 )
  • Improve readme (07ab072bc )

🏡 Chore

  • Extract @nuxt/test-utils to separate repo (#24146 )
  • Remove stray router.options file (7fbcaf290 )
  • Fix repository fields in package.json (54529c17d )
  • Add homepage and repo directory to package.jsons (#24189 )
  • Update to use @nuxt/eslint-config (#24209 )
  • Revert coverage provider version (b90b631df )

✅ Tests

  • Add route-provider e2e test (#24195 )
  • nuxt: Add additional unit tests for composables (#24289 )

❤️ Contributors

バージョン v3.8.1

リリース日 2023年11月6日

3.8.1 is a patch release focused on bug fixes and performance improvements.

👉 Changelog

compare changes

🔥 Performance

  • nuxt: Set pages on nuxt app and deduplicate calls (#24032 )
  • nuxt: Remove pure annotations plugin (#24033 )
  • nuxt: Use granular imports for auto-importing composables (#23951 )

🩹 Fixes

  • nuxt: Ensure we add prerender hints to correct event (#23799 )
  • nuxt: Close payload object (#23817 )
  • schema: Accept single string for extends (#23795 )
  • nuxt: Resolve internal target: blank links with base (#23751 )
  • nuxt,schema: Use std-env to detect whether app is being tested (#23830 )
  • nuxt: Use .json extension for server components (#23802 )
  • nuxt: Handle relative baseURL in nitro runtime config (#23841 )
  • nuxt: Improve watcher logs slightly (#23857 )
  • nuxt: Resolve @unhead/vue in template code (#23858 )
  • kit: Resolve module tsconfig paths relative to dirs (#23860 )
  • nuxt,schema,vite,webpack: Analyze w/o overriding config (#23856 )
  • nuxt: Don't use local fetch with an external baseURL (#23884 )
  • nuxt: Only skip refetching errors when hydrating (#23889 )
  • webpack: Use lodash cloneDeep again (#23888 )
  • nuxt: Init $fetch at entry start (#23906 )
  • nuxt: Render a div when client-only hydrates w/o element (#23899 )
  • vite: Remove postcss-url and duplicate postcss-import (#23861 )
  • nuxt: Use route key for loading indicator/view transition (#23868 )
  • nuxt: Unset useCookie value when it expires (#23549 )
  • vite: Use h3 cors handler for vite routes only (#23995 )
  • schema: Correctly set default cssnano config (#23980 )
  • nuxt: Use payload url for isPrerendered, not current route (#24031 )
  • vite: Don't warm up css deps and normalise urls correctly (#23975 )
  • kit: Fix addServerImportsDir implementation (#24000 )
  • nuxt: Preserve hyphens in component/layout kebab names (#23902 )
  • nuxt: Do not register loading indicator hooks on server (#24052 )
  • nuxt: Reload nitro when spa loading template updates (#24036 )
  • nuxt: Resolve imports from virtual files (#24022 )
  • vite: Include more of warmup within try/catch (#24072 )
  • nuxt: Use shared isChangingPage util in scrollBehavior (#24091 )
  • nuxt: Account for delay ≤ 0 in useCookie (#24043 )
  • nuxt: Handle async children in ClientFallback (#24086 )
  • vite: Normalise entry id for typeCheck plugin (#24114 )

💅 Refactors

  • nuxt: Use useRequestEvent() internally (#23916 )

📖 Documentation

  • Add example of auto-importing components from npm package (#23792 )
  • Update minimum required Node version (#23821 )
  • getting-started: Add schema for server (6d0f45469 )
  • Fix typo in pnpm install command (#23851 )
  • Add missing comma (#23870 )
  • Add missing nitro hooks (#23865 )
  • Fix typo in layout description (#23862 )
  • Fix typo in runtime-config page (#23882 )
  • Fix typo (#23912 )
  • Fix typos (#23921 )
  • Rename 3.nuxt.config.md to 3.nuxt-config.md (#23819 )
  • composables: Avoid double read-more in useAppConfig (5fea17288 )
  • Skip View Transitions API route middleware on server (#23935 )
  • Clarify that bridge supports definePageMeta (#23944 )
  • Fix small typo in nuxt.config.ts documentation (#23961 )
  • Update link to composables doc (#23989 )
  • Add a more helpful comment (#23999 )
  • Fix useFetch key generation logic (#24082 )
  • Fix typo (#24099 )
  • Fix imported addPrerenderRoutes name (#24102 )
  • Improve router docs on nuxt-injected options (#24126 )

🏡 Chore

✅ Tests

  • nuxt: Test remote islands for NuxtIsland (#23801 )
  • Update basic fixture config for vite 5 (#23859 )
  • Await before asserting console logs (#24051 )

🤖 CI

  • Add doc deploy webhook trigger (#23828 )
  • Run nuxt 2 edge release on node 18 (5b96049d9 )

❤️ Contributors

バージョン v3.8.0

リリース日 2023年10月19日

👀 Highlights

We have a lot of exciting features in v3.8, and can't wait for you to try it out.

💻 Nuxi improvements

Just to remind you, we're now using the new Nuxt CLI which is now versioned separately. There are some exciting improvements there to follow, so do check out the latest releases. (For example, we now share the same port with the Vite websocket, meaning better support for docker containers in development.)

🚨 Built-in Nuxt DevTools

Nuxt DevTools v1.0.0 is out and we now think it's ready to be shipped as a direct dependency of Nuxt.

👉 You can check out the release notes for more information - and stay tuned for an article detailing our roadmap for the future.

📸 Nuxt Image auto-install

We've now made <NuxtImg> and <NuxtPicture> first-class built-in components, documenting them and auto-installing @nuxt/image the first time that they are used (#23717 ).

https://github.com/nuxt/nuxt/assets/28706372/597c9307-5741-4d9c-8eab-aad5bfef2ef2

We would definitely advise using @nuxt/image if you're using images in your site; it can apply optimisations to make your site more performant.

📂 Deeper layout scanning

🚨 This is a behaviour change so do take care with this one: 🚨

We now support scanning layouts within subfolders in ~/layouts in the same way as we do with ~/components.

File Layout name
~/layouts/desktop/default.vue 'desktop-default'
~/layouts/desktop-base/base.vue 'desktop-base'
~/layouts/desktop/index.vue 'desktop'

See #20190 for more information

📊 App Manifest

We now support a built-in app manifest (see #21641 ), which generates a manifest at /_nuxt/builds/meta/<buildId>.json.

Initially this enables loading payloads only for prerendered routes, if a site is static (preventing 404s). It also enables client-side route rules. To begin with, only redirect route rules will have an effect; they will now redirect when performing client-side navigation. (More coming soon...!)

The app manifest also enables future enhancements including detection of outdated deployments by checking /_nuxt/builds/latest.json.

You can switch off this behaviour if you need to (but do let us know if you have any issues):

export default defineNuxtConfig({
  experimental: {
    appManifest: false
  }
})

🤝 Scope and context improvements

We now define a 'scope' for Nuxt composables executed in plugins (#23667 ), which allows running synchronous cleanup before navigating away from your site, using the Vue onScopeDispose lifecycle method. This should fix an edge case with cookies (#23697 ) and also improves memory management, for example in Pinia stores (#23650 ). You can read more about Vue effect scopes .

We also now support native async context for the Vue composition API (#23526 ). In case you're unaware, we support native async context on Node and Bun, enabled with experimental.asyncContext. This can help address issues with missing a Nuxt instance. But it didn't previously affect missing Vue instances.

If you experience issues with 'Nuxt instance unavailable', enabling this option may solve your issues, and once we have cross-runtime support we are likely to enable it by default.

export default defineNuxtConfig({
  experimental: {
    asyncContext: true
  }
})

We've supported defining your own NuxtLink components with the defineNuxtLink utility. We now support customising the options for the built-in <NuxtLink>, directly in your nuxt.config file (#23724 ). This can enable you to enforce trailing slash behaviour across your entire site, for example.

export default defineNuxtConfig({
  experimental: {
    defaults: {
      nuxtLink: {
        activeClass: 'nuxt-link-active',
        trailingSlash: 'append'
      }
    }
  }
})

⚡️ Data fetching improvements: deep and caching

We have two very significant new features for useAsyncData and useFetch:

  1. You can now set deep: false to prevent deep reactivity on the data object returned from these composables (#23600 ). It should be a performance improvement if you are returning large arrays or objects. The object will still update when refetched; it just won't trigger reactive effects if you change a property deep within the data.
  2. You can now use the getCachedData option to handle custom caching for these composables (#20747 )
const nuxtApp = useNuxtApp()
const { data } = await useAsyncData(() => { /* fetcher */ }, {
  // this will not refetch if the key exists in the payload
  getCachedData: key => nuxtApp.payload.static[key] ?? nuxtApp.payload.data[key]
})

We also support configuring some default values for these composables in an app-wide way (#23725 ):

export default defineNuxtConfig({
  experimental: {
    defaults: {
      useAsyncData: {
        deep: false
      },
      useFetch: {
        retry: false,
        retryDelay: 100,
        retryStatusCodes: [500],
        timeout: 100
      }
    }
  }
})

🔢 Layer improvements

We now more carefully load layer plugins (#22889 and #23148 ) and middleware (#22925 and #23552 ) in the order of the layers, always loading your own plugins and middleware last. This should mean you can rely on utilities that layers may inject.

We've also added a test suite to cover these layer resolution changes.

And probably one of the most significant changes - if you are using remote layers we now clone these within your node_modules/ folder (#109 ) so layers can use dependencies with your project. See c12 release notes for full details.

😴 Nightly release channel

Every commit to the main branch of Nuxt is automatically deployed to a new release, for easier testing before releases. We've renamed this from the 'edge release channel' to the 'nightly release channel' to avoid confusion with edge deployments. And probably also with Microsoft Edge (though I haven't heard that anyone was confused with that one!)

➡️ nuxt3 is now nuxt-nightly ➡️ nuxi-edge is now nuxi-nightly ➡️ @​nuxt/kit-edge is now @​nuxt/kit-nightly

... and so on.

You can read more about how it works .

⚗️ Nitro v2.7

Nitro v2.7 has been released with lots of improvements and bug fixes - do check out the full changelog .

🔥 One of the most significant is that we now save ~40% of bundle size in production by using native fetch (which is supported in Node 18+) (#1724 ). So if possible, we'd recommend you update your Node version to at least 18.

💪 Type import changes

🚨 This is likely to need code changes in your project 🚨

Vue requires that type imports be explicit (so that the Vue compiler can correctly optimise and resolve type imports for props and so on). See core Vue tsconfig.json .

We've therefore taken the decision to turn on verbatimModuleSyntax by default in Nuxt projects, which will throw a type error if types are imported without an explicit type import. To resolve it you will need to update your imports:

- import { someFunction, SomeOptions } from 'some-library'
+ import { someFunction } from 'some-library'
+ import type { SomeOptions } from 'some-library'

You may also encounter modules in the Nuxt ecosystem that need to be updated; please open an issue for those modules. I'm also very happy to help if you're encountering any problems with this, if you're a module author. Just tag me and I'll take a look.

If for whatever reason you need to undo this change in your project you can set the following configuration:

export default defineNuxtConfig({
  typescript: {
    tsConfig: {
      compilerOptions: {
        verbatimModuleSyntax: false
      }
    }
  }
})

However, we'd recommend only doing that temporarily, as Vue does need this option to be set for best results.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

nuxi upgrade

👉 Changelog

compare changes

🚀 Enhancements

  • kit: Add addServerImports and addServerImportsDir (#23288 )
  • nuxt: Warn when nesting nuxt links when SSR on dev (#23286 )
  • nuxt: Add prerenderRoutes ssr composable (#22863 )
  • nuxt: Enable appManifest by default (#23448 )
  • nuxt: Native async-context in vue's withAsyncContext (#23526 )
  • nuxt: Auto-install optional features on StackBlitz (#23607 )
  • kit,nuxt,vite,webpack: Support -nightly extension (#23508 )
  • nuxt: Add @nuxt/devtools as dependency and enable (#23576 )
  • nuxt: Support deep: false for data composables (#23600 )
  • nuxt: Custom cache support for data fetching composables (#20747 )
  • nuxt: Scan and register layouts in nested folders (#20190 )
  • nuxt: Prompt to autoinstall @nuxt/image when it is used (#23717 )
  • nuxt: Allow configuring default <NuxtLink> options (#23724 )
  • nuxt: Allow customising defaults for data composables (#23725 )

🔥 Performance

  • vite: Don't print server compressed size after vite build (#23359 )
  • nuxt: Verbatim module syntax + restrict type discovery (#23447 )

🩹 Fixes

  • nuxt: Initialise asyncData errors with null (#23428 )
  • nuxt: Apply scoped styles to islands (#23386 )
  • nuxt: Rename stub to avoid shadowing vue-router (#23440 )
  • nuxt: Stringify cookie values before broadcasting them (#23449 )
  • kit: Don't force config.autoImport in addServerImports (#23472 )
  • nuxt: Ignore prefix if clearNuxtState called w/o keys (#23483 )
  • nuxt: Decrement hydration count when rendering no route (#23476 )
  • nuxt: Compute fetch cache key with headers (#23462 )
  • nuxt: Mock hookable methods on nuxt 2 (#23502 )
  • kit: Revert accidental change to addPrerenderRoutes name (#23509 )
  • nuxt: Use test/dev as manifest buildId when appropriate (#23512 )
  • nuxt: Don't print warnings for unresolved ids (#23604 )
  • nuxt: Use import alias when checking if plugin is wrapped (#23617 )
  • nuxt: Tree shake all occurrences of <DevOnly> (#23466 )
  • nuxt: Give priority to later middleware when deduping (#23552 )
  • nuxt: Clear cookie BroadcastChannel when scope is disposed (#23664 )
  • nuxt: Provide global scope for nuxt plugin context (#23667 )
  • nuxt: Resolve type error in options of useFetch (#23693 )
  • webpack: Remove lodash-es + simplify postcss resolution (#23692 )
  • nuxt: Skip hydration mismatches with client components (#19231 )
  • nuxt: Write cookie values before navigating away (#23697 )
  • nuxt: Refetch both undefined/null values in useAsyncData (#23351 )
  • nuxt: Don't mark redirected routes as prerendered (#23707 )
  • nuxt: Respect custom export in component transform (#23715 )
  • nuxt: Don't use prerenderedAt to override app manifest (#23781 )
  • nuxt: Restore prerenderedAt behaviour pending next patch (108b1bdf7 )

📖 Documentation

  • Mention listhen options on nuxi dev page (#23415 )
  • Add examples for index.ts files on server routes (#23390 )
  • Improve data fetching section (#23420 )
  • Remove duplicated arrows (#23436 )
  • Extend description of handler for useAsyncData (#23389 )
  • Clarify bridge needs nitro to use runtimeConfig (#23454 )
  • Fix typo in README (#23500 )
  • Clarify that bridge.typescript option must be set. (#23503 )
  • Use html instead of xml for highlight (45c1e7f51 )
  • Fix component library example in docs (#23596 )
  • Typo in modules (#23602 )
  • Reword local module info (#23557 )
  • Add server concept (#23372 )
  • Improve nuxt kit section (#22375 )
  • Update additional mentions to nightly release channel (c63f9a95d )
  • Rename /edge-channel page to /nightly-release-channel (#23648 )
  • Add section about computed url for data fetching (#23605 )
  • Fix typo (#23656 )
  • Remove extraneous brace (b9cb08cda )
  • Fix other issues with routeRules example (818dc626c )
  • Fix typo (#23716 )
  • Update types for useFetch/useAsyncData (#23730 )
  • Add info about <NuxtImg> and <NuxtPicture> (#23741 )
  • Update to new website (#23743 )
  • Remove redundant trailing slashes from links (#23744 )
  • Fix broken link (#23750 )

🏡 Chore

  • Fix various typos and update to US English (#23580 )
  • Add description field for packages (#23734 )
  • Bump nuxt devtools to 1.0 (#23752 )
  • Allow markdownlint upgrades (3d779fcf3 )
  • Remove huntr + encourage GitHub vulnerability reporting (#23754 )
  • Refresh lockfile (#23755 )
  • Update to nitropack 2.7.0 (#23780 )
  • Upgrade to c12 1.5 with configurable layers (#23782 )

✅ Tests

  • nuxt: Add test suite for app resolution behaviour (#23520 )
  • Update prerender test (8d62c2add )

🤖 CI

  • Retry failing links 6 times (ad2a900fd )
  • Only dedupe dependencies if they affect bundle size (#23736 )

❤️ Contributors

バージョン v3.7.4

リリース日 2023年9月26日

3.7.4 is a regularly scheduled patch release.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

nuxi upgrade

👉 Changelog

compare changes

🩹 Fixes

  • nuxt: Use original escapes/quotes in page re-exports (#23191 )
  • schema: Default devServer host to undefined (#23206 )
  • nuxt: Correct islandsTransform slot regex (#23226 )
  • nuxt: Handle vite preload-helper id with extension (#23230 )
  • nuxt: Load layer middlewares before project middlewares (#22925 )
  • nuxt: Don't incl overridden layer pages as nested children (#23238 )
  • vite: Explicitly set vite manifest path (#23276 )
  • nuxt: Experimental build manifest + client route rules (#21641 )
  • nuxt: Generate empty file when shim is disabled (#23333 )
  • nuxt: Apply right types to modules and their runtime files (#23240 )
  • nuxt: Add import protection for nuxt/* exports (#23357 )
  • nuxt: Detect nested pages with /index segments (#23404 )
  • schema: Ignore pnpm store directory (3510cedc3 )

💅 Refactors

  • nuxt: Use built-in consola prompts (#23205 )
  • kit,nuxt,schema: Use consola and improve test dx (#23302 )

📖 Documentation

  • Add documentation on nuxt2 command (#23211 )
  • Clarify nuxi start command usage (#23215 )
  • Close code-block in migration guide (#23224 )
  • Typo on callHook method (#23231 )
  • nuxt: Remove hanging word in modules docs (#23242 )
  • Update latest node.js version to 20.x (#23252 )
  • Add more files to srcDir JSDoc (#23250 )
  • Add steps for contributing to docs locally (#23270 )
  • Add support details and update roadmap (#21867 , #21893 )
  • Add nuxtApp.runWithContext (#23258 )
  • Update 'scheduled' status name (#23307 )
  • Fix links to configuration options (#23324 )
  • Update link to devtools.nuxt.com (#23350 )
  • Add explicit await to clarify sendRedirect is async (#23345 )
  • Remove version from npm links to redirect to latest (#23371 )
  • Add tryUseNuxt to kit context utils list (#23373 )

🏡 Chore

🤖 CI

  • Add lychee link checker (#23254 )
  • Rename linkChecker job to link-checker (#23319 )
  • Don't run link checker on pushes to main (e0ddcfa9e )

❤️ Contributors

バージョン v3.7.3

リリース日 2023年9月13日

3.7.3 is a hotfix release to address a regression introduced in 3.7.2.

👉 Changelog

compare changes

🩹 Fixes

  • nuxt: Ensure plugins retain original order (#23174 )
  • nuxt: Allow importing server components from #components (#23188 )

💅 Refactors

  • nuxt: Don't wrap server placeholders/client fallbacks (#21980 )

📖 Documentation

  • Added missing leading slash (#23169 )
  • Update internal issue decision making flowchart link (#23162 )

❤️ Contributors

バージョン v3.7.2

リリース日 2023年9月12日

3.7.2 is a regularly scheduled patch release.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

nuxi upgrade

👉 Changelog

compare changes

🩹 Fixes

  • nuxt: Scroll to top by default on dynamic routes (#22403 )
  • nuxt: Don't joinURL with remote sources on NuxtIsland (#23093 )
  • nuxt: Exclude data-v attrs from server component props (#23095 )
  • nuxt: Handle optional params within a path segment (#23070 )
  • nuxt: Include method when creating useFetch auto key (#23086 )
  • vite: Add css to manifest without cssCodeSplit (#23049 )
  • nuxt: Find parent routes by exact path match (#23040 )
  • nuxt: Load spaLoadingTemplate if file exists (#23048 )
  • nuxt: Handle unset spa-loading fallback (#23120 )
  • kit: Improve generated tsconfig.json defaults (#23121 )
  • vite: Remove dev styles injected via absolute path (#23126 )
  • nuxt: Default scanned layer components to priority 0 (#23127 )
  • nuxt: Allow granularly overriding pages in layers (#23134 )
  • nuxt: Respect layer order for other layer plugins (#23148 )
  • nuxt: Allow changing dirs within modules (#23133 )
  • nuxt: Allow overriding components + only warn if clash (#23156 )

📖 Documentation

  • Remove 'caching' section from data fetching (fe29948fe )
  • Fix broken links on experimental features (#23052 )
  • Fix typo (#23060 )
  • Add name param to PageMeta interface description (#23107 )
  • Fix typo for experimental.componentIslands (#23138 )
  • Change NuxtLabs UI to Nuxt UI (#23150 )
  • Fix typo in nuxi init command (#23155 )

🏡 Chore

🤖 CI

  • Test on node 20.5 rather than 20.6 (#23041 )
  • Update fixtures to node 18 (#23122 )
  • Unpin node 20 actions runners (#23135 )

❤️ Contributors

バージョン v3.7.1

リリース日 2023年9月5日

3.7.1 is a regularly scheduled patch release.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🔥 Performance

  • nuxt: Prevent head dom from rendering twice (#22974 )
  • nuxt: Decrease default bundle size (#22999 )

🩹 Fixes

  • nuxt: Exclude resolved vite virtual modules prefix (#22834 )
  • nuxt: Ensure typed layout prop persists through build (#22855 )
  • nuxt: Render server components when ssr: false (#22869 )
  • kit: Respect priority when registering components dirs (#22882 )
  • kit: Allow passing a string to addLayout (#22902 )
  • nuxt: Ensure middleware is processed when returning true (#22905 )
  • nuxt: Unpause dom updates on error (#22945 )
  • nuxt: Disallow write: false for type templates (#22972 )
  • vite: Don't set explicit conditions in shouldExternalize (#22991 )
  • nuxt: Render inlined ssr styles before stylesheets (#22986 )
  • nuxt: Improve types within plugin templates (#22998 )
  • nuxt: Load layer plugins before project plugins (#22889 )
  • nuxt: Use destr in more places over JSON.parse (#22997 )
  • nuxt: Resolve head instance from Nuxt app (#22973 )
  • nuxt: Always use increment for id with client side islands (#22975 )

📖 Documentation

  • Add info about dynamic nested routes (#22862 )
  • Update nuxt bridge migration guide (#22815 )
  • Rename nuxt-community to nuxt-modules (9991da634 )
  • Add banner for readme (e92d99db3 )
  • Simplify readme (681f92915 )
  • Text center on banner (ea5142176 )
  • Clarify that 'it' is <NuxtPage> (#22912 )
  • Update examples of dynamic pageKey (#22920 )
  • Fix types in 'server utilities' example (#22978 )
  • Describe env object for nuxt plugins (#22963 )
  • Docs/3.api/3.utils/define-page-meta.md (#23006 )
  • Accessing custom props for NuxtLayout (#22989 )
  • Add information about server component context (#22964 )

🏡 Chore

  • Fix variable name in release scripts (adb6ec674 )
  • Track nuxi-edge rather than nuxi-ng (9610cf03d )

🤖 CI

  • Create 2.x release branch as well (cdf9b5547 )
  • Use GITHUB_REF_NAME to get branch for release (d49ea58de )
  • Use changelogen utility to get current branch (7431e2258 )

❤️ Contributors

バージョン v3.7.0

リリース日 2023年8月25日

👀 Highlights

🐣 A New CLI

We've refactored nuxi using unjs/citty and this marks the first Nuxt release that depends on the new version, safely in its own repository. We have grand plans for this - check out some of the features + roadmap discussions in nuxt/cli and please feel free to contribute!

Nuxi is now decoupled from the main nuxt version - we plan to iterate and release nuxi more quickly in future so you can expect new things coming soon!

🕸️ Native Web Streams and Response

With improvements in unjs/h3 and unjs/nitro , it's now possible to directly return a Response object from server routes, meaning it's also possible to return and handle streams natively in Nuxt.

👉 Check out the full detail in the unjs/h3 and unjs/nitro release notes.

🔥 HTML Rendering Optimisations

This release comes with a couple of improvements in rendering HTML responses from the server. We now determine whether to preload/prefetch resources at build time (so you can customise this in the build:manifest hook). We also now manage rendering the HTML for them directly in unhead (#22179 ), which means you can configure the order for <link>, <meta>, <script>, <style>, and more. And - in our preliminary testing - it's even faster!

It's possible to opt-in to upcoming head improvements with the experimental.headNext flag. This currently includes a new ordering algorithm based on capo.js (#22431 ) and allows enabling future optimisations as they are released in unhead:

export default defineNuxtConfig({
  experimental: {
    headNext: true
  }
})

We'd love your thoughts - you can respond with any issues/feedback in this discussion .

🛠️ Build Environment Shortcuts

In your Nuxt config you can now use $client and $server shortcuts to easily define configuration that is specific to just the Vite client/server (#22302 ) or webpack client/server (#22304 ) builds. This previously was only possible with the vite:extendConfig and webpack:config hooks.

For example:

export default defineNuxtConfig({
  vite: {
    $client: {
      build: {
        rollupOptions: {
          output: {
            chunkFileNames: '_nuxt/[hash].js',
            assetFileNames: '_nuxt/[hash][extname]',
            entryFileNames: '_nuxt/[hash].js'
          }
        }
      }
    }
  }
})

⚡️ Vite 4.4

We've chosen to unpin Vite from minor versions, meaning whenever Vite releases a new feature version you can opt-in straight away. Vite 4.4 brings a lot of exciting things, including experimental Lightning CSS support - and much more!

👉 Check out the Vite release notes for more.

💪 TypeScript Updates

We now use purely relative paths in the generated tsconfig.json instead of setting a baseUrl. This means better support for dev environments like docker images where the absolute path may not match your IDE (#22410 ).

We also set a couple of additional compiler flag defaults to match Vite/TS recommendations (#22468 ).

Plus, you should now get type hinted access to layouts in setPageLayout and also in <NuxtLayout name> (#22363 ).

🦄 Async Context support

If you've ever got an issue with 'Nuxt context unavailable' this might be one for you. We now support native async context for Bun and Node under an experimental flag, in both Nuxt and Nitro (#20918 ).

This enables using Nuxt composables on the server without needing to ensure they are being called directly in a setup function. It also allows the same in Nitro, with a new useEvent() utility that is usable in server routes.

To try it out, you can enable experimental.asyncContext:

export default defineNuxtConfig({
  experimental: {
    asyncContext: true
  }
})

👓 Watcher Updates

We've fixed a couple of issues with watchers, meaning that you should need to restart your server less often - and you should see a significant performance increase if you are using layers.

⚗️ Nitro 2.6

There lots more exciting features coming directly from Nitro 2.6, including smaller, lighter servers and new persistent data storage in a .data directory.

👉 Read more in the full release article .

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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.

👉 Changelog

compare changes

🚀 Enhancements

  • vite: Unpin vite from minor (#22031 )
  • nuxt: Polyfill idle callback utils (#21863 )
  • nuxt: Smooth scroll behavior option (#21948 )
  • schema,vite: Allow $client and $server vite env overrides (#22302 )
  • schema,webpack: Allow $client and $server overrides (#22304 )
  • nuxt: Allow dynamic scrollToTop page meta (#21741 )
  • nuxt: Expose filtered templates in app:templatesGenerated hook (#21935 )
  • nuxt: Render all head tags on server with unhead (#22179 )
  • nuxt: Auto-install @nuxt/webpack-builder when needed (#21747 )
  • nuxt: Allow remote sources for islands (#21592 )
  • nuxt: Environment-specific plugin execution for islands (#20726 )
  • kit,nuxi: Add writeTypes utility (#22385 )
  • nuxt: Autocomplete layouts in setPageLayout/<NuxtLayout> (#22362 )
  • nuxt: Allow 'lazy' (non-blocking) server components (#21918 )
  • nuxt: Use build plugin to access nuxt route injection (#21585 )
  • vite,webpack: Tree-shakable import.meta.* build flags (#22428 )
  • nuxt: Resolve unresolved paths within node_modules (#22478 )
  • nuxt: Experimental native async context support (#20918 )
  • nuxt: Warn on external webpack/nitro/postcss config (#22521 )
  • nuxt: Allow experimental global: 'sync' components (#22558 )
  • nuxt: Make app.rootId optional (#22528 )
  • nuxt: Add experimental.headNext unhead integration (#22620 )
  • cli: Detect bun package manager (#22673 )
  • nuxt: Upgrade nitro + reduce node-specific usage (#22515 )
  • nuxt: Add support for routeRules defined within pages (#20391 )
  • schema: Support setting hidden sourcemaps (#22787 )
  • kit,nuxt: Respect nuxt ignore patterns in nitro (#22808 )
  • nuxt: Migrate to new nuxt/cli (#22799 )
  • schema: Export ./schema/config.schema.json subpath (#22813 )

🔥 Performance

  • nuxt: Export DefineNuxtConfig interface from nuxt/config (#22391 )
  • nuxt: Write templates in single sync step + improve logs (#22384 )
  • nuxt: Render css/inline css higher than resource hints (#21793 )
  • nuxt: Experimental support of capo.js head tag order (#22431 )
  • nuxt: Use LRU prerender cache and limit cached items (#22465 )
  • nuxt: Reduce multiple calls to .toLowerCase() (#22743 )
  • nuxt: Reduce multiple calls to dirname (#22800 )

🩹 Fixes

  • nuxt: Await prerender:routes hook (#22247 )
  • nuxt: Access resolved scrollBehaviorType (#22264 )
  • nuxt: Add overloads for asyncData generic + default (#22258 )
  • nuxt: Bind createClientOnly render function to ctx (#22289 )
  • webpack: Remove legacy support for build.extend (#22305 )
  • nuxt: Allow validate return typing to be either error or boolean (#22323 )
  • kit: Handle tuple-format modules in hasNuxtModule (#22316 )
  • nuxt: Components auto-import for JSX (#22330 )
  • nuxt: Pass (and handle) relative paths in builder:watch (#22333 )
  • nuxt: Use computed path value for useFetch hash (#22378 )
  • cli: Only strip extensions from files (#22399 )
  • nuxt: Disallow redirects to more script protocols (#22366 )
  • nuxt: Test watch paths against all layer srcDirs (#22307 )
  • nuxt: name is an optional prop for <NuxtLayout> (0d9a0b753 )
  • kit: Don't unsubscribe from file writing (716a5b834 )
  • nuxt: Support uppercase route methods in useFetch (#22418 )
  • kit: Remove baseUrl and use relative paths in tsconfig (#22410 )
  • nuxt: Print name of missing island component (#22440 )
  • nuxt: Broken capo.js injectHead usage (#22447 )
  • kit: Apply preferred options for esbuild transpilation (#22468 )
  • nuxt: Correctly update object cookies in useCookie (#22474 )
  • nuxt: Use internal:nuxt namespace (9b0d371b0 )
  • nuxt: Remove unused normalize call (14bf2b02f )
  • cli: Display log when restarting nuxt (#22500 )
  • nuxt: Resolve type import paths (#22476 )
  • schema: webpack options should be optional (#22524 )
  • nuxt: Enable hmr of app.config.ts files (#22494 )
  • vite: Add hookable to externals list (4552d39c4 )
  • vite: Disable assignement in replace plugin (37ba58630 )
  • schema: Ignore empty string in app.{rootId ([rootTag} (#22543 )](https://github.com/nuxt/nuxt/commit/rootTag}` (#22543 )))
  • vite: Include import.meta build vars in define as well (#22576 )
  • nuxt: Provide fallback route (#22580 )
  • nuxt: Trigger immediate DOM update on page:finish (#22566 )
  • nuxt: Unsub from hooks when unmounting indicator (#22592 )
  • cli: Only watch distDir after first build (#22614 )
  • nuxt: Use relative paths when augmenting types (#22633 )
  • nuxt: Don't prompt to install packages in CI (#22636 )
  • cli: Ignore error if nitro is not enabled on bridge (#22642 )
  • nuxt: Remove experimental hash hydration (#22648 )
  • nuxt: Correct revive payload data type (#22667 )
  • vite: Use '' key for root scope in variable collector (#22679 )
  • nuxt: Warn when ignoring duplicate island/server component (#22709 )
  • nuxt: Add exclude paths to nitro tsconfig.server.json (#22768 )
  • nuxt: Recreate asyncData when immediate is disabled (#20980 )
  • nuxt: Respect ignorelist when scanning auto-imports (#22782 )
  • schema: Mark schema as free of side effects (#22793 )
  • nuxt: Default spaLoadingTemplate to false (#22798 )
  • nuxt: Fully resolve unctx where possible (#22811 )
  • vite: Only mark nitro deps as externals when building (#22812 )

💅 Refactors

  • nuxi,schema: Move loading template into schema (#22336 )
  • nuxt: Add additional flag to enable remote sources (#22409 )
  • nuxt: Use nuxi-ng for edge releases (#22413 )
  • nuxt: Import useNitroApp from subpath (#22785 )

📖 Documentation

  • Mention #components import for dynamic component (#22231 )
  • Fix typo (#22308 )
  • Add information on how to type custom hooks (#22312 )
  • Correct manually typing runtime config example (#22393 )
  • Update .env section (#22369 )
  • Add example for accessing vite config programmatically (#18812 )
  • Add recommendation to install nuxtr (#20808 )
  • Add some more debugging tips (#22415 )
  • Document NuxtIsland (#22434 )
  • Escape ] in code-block filenames (#22389 )
  • Add temporary website for docs contribution (#22469 )
  • Update prerender documentation (#22471 )
  • Update hybrid rendering section (#22475 )
  • Fix typo in scrollToTop (#22503 )
  • Add status type for useAsyncData (#22511 )
  • Rephrase link to useSeoMeta parameters (#22513 )
  • Update api example for pick (#22531 )
  • Add closing blocks for ReadMore components (#22541 )
  • Update rendering error page (#22523 )
  • Mention adding auto-import of third party packages (#22575 )
  • Update and shorten server example (#22583 )
  • Update twitter/X logo (#22569 )
  • Added addServerHandler example to modules author guide (#22603 )
  • Clarify server: false doesn't await on initial load (#22619 )
  • Fix link to deployment page (#22618 )
  • Warn directives must be registered on both server/client (#22627 )
  • Revert import.meta.* update until v3.7 release (98c17e5d4 )
  • Improve custom component dirs example (#22697 )
  • Mention NuxtIsland in server only components docs (#22685 )
  • Add additional type generics to useFetch docs (#22755 )
  • Add additional type generics to useAsyncData (#22760 )
  • Add instructions for Bun package manager (#22779 )
  • Fix typo in bun package manager name (#22781 )

📦 Build

🏡 Chore

  • Dedupe and bump semver (#22322 )
  • Update codesandbox links (5edf00f06 )
  • Add issue reproduction bot (#22495 )
  • Remove unused import (8eefb6548 )
  • Increase stale operations per run (#22501 )
  • Refresh lockfile (#22518 )
  • Increase stale bot limit to 300 (#22538 )
  • schema: Enable linting (#22546 )
  • Replace .eslintignore file with 'ignorePatterns' (#22547 )
  • kit: Remove unused internals (#22555 )
  • Depend on h3-nightly on edge releases (#22593 )
  • Check if deps exist (817c12f02 )

✅ Tests

  • Remove separate test for baseurl (#22467 )
  • Remove JS payload test + add non-async context test (#22530 )
  • Refactor test suite and reduce networkidle dependency (#22596 )
  • Reduce verbose log outputs (c8cba7a06 )
  • Add regression test for escaping payload (#22774 )

🤖 CI

  • Add ecosystem-ci pr comment trigger (#22239 )
  • Add semantic pull request workflow (#22241 )
  • Grant permission to comment on prs (6f1a557e5 )
  • Harden GitHub actions (#22321 )
  • Pin actionlint script (#22324 )
  • Skip semantic validation on release branches (459dc7d2d )
  • Update issue label for reproduire (4e0a499a0 )
  • Pin version of actionlint used (b702adc24 )
  • Try another way to disable semantic validation of release prs (eff05e1d4 )
  • Bump timeout minutes for windows fixtures 🙈 (33389dc4e )

❤️ Contributors

バージョン v3.6.5

リリース日 2023年7月19日

3.6.5 is a hotfix patch release addressing the regression with nuxt/content introduced in v3.6.4.

v3.6.4 release notes

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🩹 Fixes

  • nuxt: Remove dist from the default ignore list (#22227 )

❤️ Contributors

バージョン v3.6.4

リリース日 2023年7月19日

3.6.4 is a patch release, brought forward to allow releasing some important bug fixes before work begins on 3.7.

Warning We're currently investigating a regression with nuxt/content and will be releasing 3.6.5 later today.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🔥 Performance

  • nuxt,schema: Do not watch buildDir and node_modules (#22214 )

🩹 Fixes

  • nuxt: Correctly use toLowerCase for possible moduleResolution (#22160 )
  • nuxt: Don't redirect if initial path has trailing slash (#22192 )
  • nuxt: Work around payload extraction issue (#22162 )
  • nuxt: Add baseURL to island fetch requests (#22009 )
  • nuxt: Resolve race condition regenerating auto imports (#22201 )
  • nuxt: Ensure we only increment hydrating count once (#22200 )
  • nuxt: Avoid premature hydration when using async layouts (#22198 )
  • cli: Support --inspect in dev mode (#22205 )
  • test-utils: Pass along error if server can't start (#22216 )

📖 Documentation

  • Add runtime storage configuration examples (#22189 )
  • Add instruction on how to use other modules in a module (#22081 )
  • Standardize indentation and tag positioning (#22157 )

❤️ Contributors

バージョン v3.6.3

リリース日 2023年7月14日

3.6.3 is the next patch release, including a number of fixes. It's anticipated this will be the last patch release before 3.7.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🔥 Performance

  • nuxt: Prepopulate island payloads from rendered html (#22049 )

🩹 Fixes

  • kit: Module compatibility not working with module names (6cabe69ce )
  • schema: Correct type of unctx options (4e32e70bb )
  • vite: Pass modulesDir to isExternal (#21966 )
  • nuxt: Add pages in correct hook when generating (#22088 )
  • test-utils: Export from core playwright package (#22122 )
  • nuxt: Skip view transitions where there is no route change (#22140 )
  • nuxt: Skip scanning components that do not produce a name (#22074 )
  • cli: Add aliases to monorepo paths to tsconfig includes (#21997 )
  • cli: Allow non-existent experimental option (0643d4315 )

💅 Refactors

  • cli,schema: Add bundler module resolution flag (#22142 )

📖 Documentation

  • Fix accessing custom props from child pages (#21977 )
  • Add leading slash (3bae61507 )
  • Add more internal links (#22013 )
  • Add space in list (#22032 )
  • Add details and components folder to auto imports introduction (#22062 )
  • Use sfc syntax in example (#22073 )
  • Prefix internal links with / (#22118 )
  • Fix typos (#22125 )
  • Update link to router options (#22131 )

🏡 Chore

❤️ Contributors

バージョン v3.6.2

リリース日 2023年7月5日

3.6.2 is the next patch release, with a raft of fixes including preparations for use without --shamefully-hoist and some fixes for data fetching within nested layouts/pages.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🔥 Performance

  • nuxt: Don't run island transform plugin if disabled (#21844 )
  • nuxt: Allow hmr for server components in dev mode (#21916 )
  • nuxt: Use getters when constructing reactive routes (#21957 )

🩹 Fixes

  • nuxt: Only redirect if path is not the same as initial url (#21815 )
  • cli: Resolve @nuxt/ui-templates from modulesDir (#21836 )
  • nuxt, vite: Do not use cjs utils to resolve/alias vue (#21837 )
  • nuxt: Improve default prerender behaviour (#21817 )
  • vite: Greater type-safety within runtime vite-node (#21849 )
  • nuxt: Ensure static presets equivalent to nuxi generate (#21860 )
  • nuxt: Handle injecting multiple entry ids for styles (#21864 )
  • nuxt: Stop loading indicator on navigation failure (#21751 )
  • cli: Respect nitro ssl cert/key variables (#21912 )
  • nuxt: Include external layers in tsconfig.json scope (#21917 )
  • nuxt: Support custom route name meta with typedPages (#21659 )
  • vite: Remove @vue/ scoped libraries from resolutions (#21922 )
  • nuxt: Add layers in node_modules to tsconfig include (#21929 )
  • nuxt: Regenerate imports after template (#21934 )
  • vite: Fix issue detecting shadowed keyed composables (#21891 )
  • nuxt: Use $fetch.raw in dev client mode for islands (#21904 )
  • schema: Warn if user provides vite.publicDir (#21847 )
  • nuxt: Preserve old vnode when leaving nested route (#21823 )
  • kit: Ignore telemetry startup time (as it has prompt) (#21959 )

📖 Documentation

  • Add warning about dynamic import of css (#21805 )
  • Update example links (#21811 )
  • Fix broken spaLoadingTemplate link (#21845 )
  • Update useFetch return values (#21852 )
  • Describe environment override feature (#21879 )
  • Add Daniel example for hybrid rendering and Vercel (20d59d1cf )
  • Improve hybrid rendering (3fb329cc8 )
  • rendering: Add end of sentence (565787183 )
  • Add closing bracket (#21887 )
  • Added a note about server dynamic routes limitation (#21919 )
  • Update docs for <NuxtLoadingIndicator> (#21952 )
  • Update more links to examples repo (13a892361 )
  • Add JetBrains IDEs debug configuration (#21965 )

🏡 Chore

  • Prune internal unused code and exports (#21809 )
  • Add codeflow overrides configuration (d7267663f )

✅ Tests

  • Add nuxt-vitest and composable unit tests (#21884 )

❤️ Contributors

バージョン v3.6.1

リリース日 2023年6月26日

3.6.1 is a bugfix/patch release with some significant patches merged since 3.6.0

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🩹 Fixes

  • nuxt: Use esbuild/acorn instead of typescript dep (#21729 )
  • nuxt: Proxy headers to islands + returned prerender hints (#21740 )
  • nuxt: Respect false to disable spa loading template (#21739 )
  • nuxt: Remove path from SPA payload (#21732 )
  • nuxt: Only remove one item from middleware (#21730 )
  • nuxt: Escape colons in page paths (#21731 )
  • nuxt: Augment nitro config within server context as well (#21724 )
  • nuxt: Inline global css with ssr: false route rule (#21763 )
  • vite: Resolve css files without importer id first (#21770 )
  • vite: Emit assets referenced in inline css (#21790 )
  • nuxt: Support importing types from #imports (#21796 )
  • nuxt: Use starting index when transforming islands (#21795 )

📖 Documentation

  • Add defineNuxtRouteMiddleware migration (#21718 )
  • Add a link to Docus layer nuxt config file (#21742 )
  • Remove outdated reference to stable version (#21785 )
  • Centre example loading spinner (#21792 )

✅ Tests

❤️ Contributors

バージョン v3.6.0

リリース日 2023年6月23日

3.6.0 is the next minor release, packed with improvements and bug fixes.

📣 Upcoming news

In the coming week you can expect two announcements:

  1. The open-sourcing of nuxt/cli by @pi0 - a new, drop-in replacement for nuxi featuring more extensibility and better DX. We are aiming to release this alongside Nuxt 3.7, but you would be very welcome to test and contribute to nuxi-ng before then!
  2. Three significant RFCs: Nuxt Font, Nuxt Assets and Nuxt Scripts. We're expecting an initial POC to take shape in the next month, and would very much appreciate community feedback on this.

👀 Highlights

This minor release contains quite a lot, and we have big plans

 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 .

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.

👉 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 , 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 .

👉 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 , 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> and layoutRef on <NuxtLayout . 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 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 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 .

Finally, we have removed more locations where objects had a default any type . 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 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 that are worth checking out.

Of particular note is experimental support for streaming, which is also enabled by a couple of changes in Nuxt itself.

🛠️ New tools for module authors

This release brings a number of utilities for modules authors to easily add type templates and assert compatibility 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 to try it out in the coming days.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🚀 Enhancements

  • nuxt: Sync useCookie state between tabs (#20970 )
  • kit: Module compatibility utils (#21246 )
  • nuxt: Add renderResult to app:rendered (#18610 )
  • webpack: Allow configuring esbuild-loader options (#21436 )
  • nuxt: Add open option in navigateTo helper (#21333 )
  • webpack, schema: Add webpack experiments configuration (#21446 )
  • nuxt: Provide clearNuxtState composable (#21409 )
  • kit: addTypeTemplate helper with auto-registration (#21331 )
  • nuxt: Return status from useAsyncData (#21045 )
  • nuxt: Allow accessing NuxtPage ref via pageRef (#19403 )
  • nuxt: Allow accessing NuxtLayout ref via layoutRef (#19465 )
  • nuxt: Emit error in ssr-error event (#21547 )
  • nuxt: Start loading indicator state with middleware (#21003 )
  • kit: Allow direct function in defineNuxtModule (#20763 )
  • nuxt: Expose useNuxtApp to window for convenience (#21636 )
  • nuxt: Allow configuring spa loading indicator (#21640 )
  • nuxt: Add types for nuxt-defined nitro runtime hooks (#21666 )
  • nuxt: Update devdependency nitropack to v2.5.1 (#21696 )

🔥 Performance

  • nuxt: Mark define functions as side-effect free at source (#21434 )
  • nuxt: Import error component synchronously (#21406 )
  • nuxt: Use prerendered islands to serialise/revive payload (#21461 )
  • nuxt: Extract and apply plugin order at build time (#21611 )

🩹 Fixes

  • nuxt: Handle page rendering on different path (#21408 )
  • nuxt: Replace BigInt literal with BigInt constructor (#21427 )
  • vite: Remove resolveId workaround and update vite-node (#21423 )
  • schema: Remove obsolete terser option from webpack config (#21407 )
  • nuxt: Skip vue render when redirecting (#21412 )
  • nuxt: Avoid early returning renderer with empty response (#21439 )
  • nuxt: Add missing vue types (#21445 )
  • nuxt: Prefix server component ids to avoid collisions (#21472 )
  • schema: Add more explicit types for config schema (#21475 )
  • nuxt: Fix typo on nitro.autoImport option (#21485 )
  • nuxi,nuxt: Remove baseUrl + use relative paths in tsconfig (#21081 )
  • vite: Invalidate templates by dst not src (#21501 )
  • nuxt: Don't disable vue endpoint in dev mode (#21524 )
  • nuxt: Respect query/hash for external routes in navigateTo (#21500 )
  • nuxt: Abort navigation when updating window.location (#21521 )
  • vite: Ignore and warn if vite config file exists (#21588 )
  • nuxt: Ensure prerendered components are treated as islands (#21583 )
  • nuxt: Improve warning for invalid children of <Title> (#21613 )
  • nuxt: Replace : in rendered server components (for win) (#21645 )
  • cli: Add back default baseUrl in tsconfig.json (#21632 )
  • nuxt: Post non-proxied cookie value via BroadcastChannel (#21653 )
  • nuxt: Stop indicator when not changing page component (#21656 )
  • nuxt: Scroll to top in nested routes (#21657 )
  • nuxt: Inline css directly in root component (#21573 )
  • nuxt: Move to @typescript-eslint/typescript-estree (#21664 )
  • nuxt: Guard res.end() calls with check if event is handled (#21665 )
  • nuxt: Do not embed error path in payload (#21671 )
  • nuxt: Use static nitro build if possible (#21655 )
  • nuxt: Add aliases and augmentations for nitro context (#21680 )
  • nuxt,schema: Prefer unknown rather than any for signatures (#21700 )
  • schema: Change redirect type for NuxtPage type (#21713 )
  • nuxt: Fix error on layout switching (#21450 )

📖 Documentation

  • Add info about vue configuration (#21303 )
  • Include example for server utilities (#21337 )
  • Improved recommended gitignore list (#21451 )
  • Add info about merging strategy in app config (#21462 )
  • Avoid using render when defining rendering (#21490 )
  • Remove example of deprecated reactivity transform (#21396 )
  • Fix addTypeTemplate typos (#21520 )
  • Add warning about redirect check (#20680 )
  • Remove link to closed RFC (#21564 )
  • Info icon fix on "Standalone server" section (#21589 )
  • Add note to use nuxt with bridge if nitro is false (#21586 )
  • Add styling section (#21525 )
  • Add full stop (#21614 )
  • Reorder sfc blocks and add initial slash in link (#21618 )
  • Add info on extending the HTML template (#21615 )
  • Document parallel option on plugins (#21622 )
  • Americanize spelling + fix typos (#21627 )
  • Remove examples/ from repository (#21538 )
  • examples: Add bullet points (9df892a17 )
  • Add experimental features page (#21617 )
  • Fix typo in experimental features (#21663 )
  • Update specified Nuxt 2 version in migration guide (#21699 )
  • Added @latest to install commands (#21702 )

🏡 Chore

✅ Tests

🤖 CI

  • Move bundle skipping logic to workflow (#21448 )
  • Build project before calculating bundle size (ce096da96 )

❤️ Contributors

バージョン v3.5.3

リリース日 2023年6月6日

3.5.3 is expected to be the last patch release before our next raft of features lands in v3.6.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🔥 Performance

  • nuxt: Avoid watching nested paths (#21256 )

🩹 Fixes

  • nuxt: Handle serialising empty bigint (#21257 )
  • cli: Pass --no-clear config through to vite (#21262 )
  • cli: Always use the latest devtools wizard (#21291 )
  • schema: Update vue-loader options type (#21363 )
  • schema: Add types for vue experimental features (#21364 )
  • nuxt: Display errors in client overlay with typeCheck (#21064 )
  • nuxt: Support usage of std-env in runtime code (#21372 )
  • nuxt: Key distinct pages differently for legacy asyncData (#21263 )
  • vite: Skip generating keys for locally scoped functions (#20955 )
  • kit: Temporarily inline lodash.template from lodash-es (#20892 )

📖 Documentation

  • Add index.vue to page routing example (#21240 )
  • Distinguish between $fetch and fetch composables (#21228 )
  • Adjust env property to match runtimeConfig (#21265 )
  • Fix Cloudflare capitalization (#21267 )
  • Migrate transition class names and style prop (#21281 )
  • Remove irregular spaces (#21380 )

🏡 Chore

  • Pin dev dependencies (9fb83b744 )
  • Avoid inlining deps in vitest (#21316 )
  • Rewrite crawler to remove old dependencies (#21326 )
  • Support vitest 0.30.0 peer dependency (d58d1ea1e )

✅ Tests

🤖 CI

  • Apply security best practices to workflows (#21328 )
  • Pin more action dependencies to hash (#21330 )

❤️ Contributors

バージョン v3.5.2

リリース日 2023年5月29日

3.5.2 is a patch release focusing on bug fixes.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

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

🔥 Performance

  • nuxt: Use .test and hoist regexps where possible (#21011 )

🩹 Fixes

  • nuxt: Fix useLazyFetch types (#20989 )
  • nuxt: Scan component dirs case-sensitively (#20995 )
  • schema: Remove duplicate @default jsdoc tag (#21010 )
  • nuxt: Add type support for router composables without pages/ integration (397c54c9d )
  • nuxt: Use simple incrementing id on client (#20992 )
  • nuxt: Treeshake <DevOnly> with webpack (#21013 )
  • nuxt: Await nuxt ready state before refreshNuxtData (#21008 )
  • nuxt: Show error page after fatal abortNavigation (#21047 )
  • nuxt: Normalize windows paths in granular watcher (#21066 )
  • nuxt: Omit Set-Cookie header if value is null (#21072 )
  • nuxt: Resolve modules relative to modulesDir (#21082 )
  • vite: Narrow vite-node inline pattern (#21224 )

📖 Documentation

  • Fix typo in modules directory example (#21014 )
  • Fix a typo in code example (#21057 )
  • Link to correct webpack css extraction loader (4e6369cef )
  • api: Add render:island hook (#21065 )
  • Rewrite data fetching section (#21031 )
  • Improve data fetching docs (#21197 )

🏡 Chore

✅ Tests

  • Refactor type tests into a separate fixture (#21007 )
  • Close out some missing browser contexts (3bc3aeaf6 )

❤️ Contributors

バージョン v2.17.3

リリース日 2024年1月12日

2.17.3 is the next patch release for the 2.x branch.

👉 Changelog

compare changes

💅 Refactors

  • Migrate to hookable package (#24426 )

🏡 Chore

  • Fix invalid package files with npm pkg fix (4d0474c4b )

✅ Tests

🤖 CI

  • Split type check into separate test (40f1f301e )

❤️ Contributors

バージョン v2.17.2

リリース日 2023年10月24日

👉 Changelog

compare changes

🩹 Fixes

  • types: Prevent overwriting vue types in template (#22802 )
  • types: Don't pin webpack types to exact version (#23531 )
  • Remove md4 patch now that webpack has it in core (#23703 )

🤖 CI

  • Add script to update changelog for 2.x releases (#23031 )
  • Revert to codecov-action v3 (e66e44803 )
  • Remove node version from matrix (#23706 )
  • Use node 18 for ci jobs (#23701 )

❤️ Contributors

バージョン v2.17.1

リリース日 2023年7月14日

2.17.1 is the next patch release for Nuxt 2.

👉 Changelog

compare changes

🩹 Fixes

  • webpack: Downgrade dev-middleware to fix peer dep issue (#21626 )
  • webpack: Pin webpack-dev-middleware to 5.0.0 (#21804 )

❤️ Contributors

バージョン v2.17.0

リリース日 2023年6月9日

2.17.0 is the next minor release for Nuxt 2.

✨ Highlights

Nuxt 2.17 comes with a few new features, including better support for new Vue 2.7 types, and supporting passing postcss config as a function.

It also includes support for Node 20+ and a fix for a dependency issue with the Babel preset that affected new installs.

👉 Changelog

compare changes

🚀 Enhancements

  • types: Support nuxt types for defineComponent (#19789 )
  • csp: Support generating nonce for scripts and links in ssr (#9621 )
  • webpack: Support passing function as postcssOptions (#19495 )

🔥 Performance

  • config: Avoid recursive md4 patching (7fab95252 )

🩹 Fixes

  • Relax node engines upper constraint (010b539ed )
  • utils: Respect patterns within paths when sorting routes (#20669 )
  • vue-app: Skip page render early on error or navigation (#20719 )
  • babel-preset-app: Add explicit dep on used babel plugin (#21488 )

🏡 Chore

✅ Tests

  • Add catchall path to route generation test (71c359516 )
  • Update windows snapshot (4ec274ae2 )
  • Update jest snapshots to remove escaped quotes (f93411c7c )

🤖 CI

  • Run tests in node 16 (#20644 )
  • Pin actions by hash and use corepack (#21356 )

❤️ Contributors