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

リリース日 2024年7月18日

3.12.4 is the next regularly scheduled patch release.

👉 Changelog

compare changes

🔥 Performance

  • vite: Start warmups after nitro build (#27963 )
  • vite: Avoid extra resolve call for resolveId in layers (#27971 )
  • kit,nuxt,schema,vite,webpack: Use explicit exports (#27998 )

🩹 Fixes

  • schema: Resolve public alias correctly (#27975 )
  • nuxt: Omit rendering payload prefetch when noScripts (#27972 )
  • nuxt: Add / as fallback if page can't be identified (e6109b226 )
  • ui-templates: Validate templates with html-validate (#28024 )
  • schema: Don't constrain postcss plugin options (#28045 )
  • kit: Remove exports from v4 branch (5c8312e9b )
  • nuxt: Use unhead key for ad-hoc module options (#28088 )
  • nuxt: Use native vue-router composables (#28114 )
  • kit: Ensure getNuxtVersion returns string (#28125 )
  • nuxt: Always prerender at least one page with crawler (#28131 )
  • nuxt: Consider doc scroll-padding-top in scrollBehavior (#28083 )
  • nuxt: Only warn when useAsyncData returns undefined (#28154 )
  • nuxt: Revert change to getCachedData null response (d10cea11b )
  • schema: Don't use app/ as srcDir if it doesn't exist (#28176 )
  • kit: Normalise serverDir within layers using v4 compat (#28177 )
  • nuxt: Allow getCachedData to return undefined (#28187 )
  • nuxt: Use addEventListener to register cookie store listener (#28193 )
  • nuxt: Merge route meta properties with scanned meta (#28170 )
  • nuxt: Prevent duplicate set-cookie headers (#28211 )

💅 Refactors

  • schema,vite,webpack: Rework postcss module loading (#27946 )
  • nuxt: Remove _registeredComponents from ssrContext (#27819 )
  • nuxt: Use errx to handle dev log traces (#28027 )

📖 Documentation

  • Fix link (83bd4fde9 )
  • Fix Cloudflare spelling (#27989 )
  • Update example to use nuxtApp.runWithContext (#28000 )
  • Remove deprecated pending variable from data fetching docs (#28011 )
  • Clarify xrsp danger (#28053 )
  • Deprecate pending and emphasis undefined (#28113 )
  • Update phrasing in route announcer (#28108 )
  • Use code groups for install commands in module guide (#28094 )
  • Capitalize text (#28056 )
  • Mention content in upgrade guide v4 folder structure (#28090 )
  • Remove a resolved issue from view transition docs (#28091 )
  • Clarify navigateTo is not for nitro routes (#28092 )
  • Warn about nested islands (#28062 )
  • Add info about layers/ directory (#28128 )
  • Codemods for migrating to Nuxt 4 (#28072 )

✅ Tests

  • Add typeCheck test in minimal build (#28166 )

🤖 CI

  • Run prepare step before linting docs (f8fbefb42 )
  • Run prepare step before linting docs (d629b82b3 )

❤️ Contributors

バージョン v3.12.3

リリース日 2024年7月2日

3.12.3 is the next regularly scheduled patch release.

👉 Changelog

compare changes

🔥 Performance

  • nuxt,vite: Use native fs utils rather than fs-extra (#27787 )
  • schema: Use chokidar when a custom srcDir is provided (#27871 )
  • nuxt: Ensure prefetchComponents is treeshaken on server (#27905 )

🩹 Fixes

  • nuxt: Flag async data promise as cancelled only if defined (#27690 )
  • schema: Handle backwards compat for dir.app (0c73cb734 )
  • nuxt: Support hoisting types of subpath imports (#27720 )
  • nuxt: Resolve routes when navigateTo called with open (#27742 )
  • nuxt: Handle subpaths more correctly (d7402a799 )
  • nuxt: Delay navigation until user input is acknowledged (#27743 )
  • nuxt: Resolve aliases used in nitro plugin paths (#27741 )
  • schema: Do not use full path assets/public aliases (d0518650f )
  • nuxt: Defer registering inp handler until nuxt is mounted (866a5319a )
  • nuxt: Add refresh type in server component refs (#27778 )
  • nuxt: Extract all-literal page meta (#27821 )
  • kit: Handle loading nuxt 4+ (cf251bd48 )
  • nuxt: Handle external links to named route objects (#27829 )
  • nuxt: Use URL to encode redirected URLs (#27822 )
  • nuxt: Don't use app version when verifying nuxt deps (#27864 )
  • nuxt: Prompt to set compatibility date with latest nitro (#27893 )
  • nuxt: Add #vue-router alias for backwards compat (#27896 )
  • nuxt: Move app augments to core nuxt types (#27900 )
  • nuxt: Pass augmented pages to child paths (ecb35d3a2 )
  • nuxt: Use pascal name when loading server component (#27928 )
  • nuxt: Improve async data warning (#27874 , #27934 )
  • nuxt: Allow configuring server components in modules (#27936 )
  • vite: Omit css ?raw from head when in dev mode (#27940 )
  • kit,nuxt: Ensure webworker types are available (4cab71d66 )
  • nuxt: Seed crawler when prerendering pages (#27955 )
  • vite: Fix type issue with legacy dev bundler (f9fa1a3e9 )
  • nuxt: Improve dx around compatibility date prompt (#27965 )

💅 Refactors

  • kit,nuxt: Use performance.now to measure time (d14f7ec46 )

📖 Documentation

  • Add referral query variable to Vue School Links (#27670 )
  • Fix variable name (#27675 )
  • Clarify how transitions are configured globally (#27679 )
  • Remove outdated recommendation (#27691 )
  • Add refreshCookie on useCookie doc page (#27744 )
  • Sync changes from main branch (e7fbc9f81 )
  • Remove outdated tip (#27773 )
  • Warn about awaiting useFetch/AsyncData in wrappers (#27785 )
  • Update some code groups with package manager examples (#27791 )
  • Hint to use runtime config (#27859 )
  • Use internal link (#27883 )
  • Update links to vue-router docs (#27895 )
  • Use internal link (#27894 )
  • Remove warning about type checking (#27911 )
  • compatibilityVersion is available in the latest release (#27919 )
  • Update roadmap + readme (748bc751d )
  • Update Nuxt 3 -> Nuxt or Nuxt 3+ (3c16c890c )
  • Update reference to nightly release for testing nuxt 4 (5d2dc9714 )
  • Remove duplicate server-side notice in runtime config (#27929 )
  • Warn about ref unwrapping when auto-importing refs (#27933 )
  • Mention layers in directory guide (c222fe7aa )

🏡 Chore

✅ Tests

  • schema: Normalize snapshot paths for windows (#27654 )
  • nuxt: Normalize paths for windows (#27653 )
  • Bump timeout for node-compat test (228b8b889 )
  • Slightly improve test reliability (#27811 )

🤖 CI

  • Update changelog from 3.x branch updates (2b6967fbb )
  • Add 3x tag instead (c0ef279f2 )
  • Run workflows against 3.x branch as well (31255a14d )
  • Use correct SHA calculation for release-pr action (#27604 )
  • Resolve bash syntax error (#27789 )
  • Only run scorecards against main branch (7abd982f8 )
  • Raise renovate prs against 3.x branch too (f176c150a )
  • Ignore @vitejs/plugin-vue again (56660cbdd )
  • Prevent more than one release from occurring at same time (71705550f )
  • Don't run changelog update on 2.x branch (1be639364 )

❤️ Contributors

バージョン v3.12.2

リリース日 2024年6月16日

3.12.2 is the a regularly scheduled patch release.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

npx nuxi@latest upgrade --force

This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.

👉 Changelog

compare changes

🔥 Performance

  • kit: Deduplicate layers before resolving config (#27582 )
  • webpack: Decrease assets map iterations (d929cd4ef )
  • kit: Various performance improvements (#27600 )
  • vite: Various performance improvements (#27601 )
  • nuxt: Don't wait for key deps check (#27638 )

🩹 Fixes

  • nuxt: Call onNuxtReady callback without arguments (#27428 )
  • schema: Don't narrow head string types to literals (#27540 )
  • schema: app/ dir backwards compatibility (#27529 )
  • nuxt: Manually assign payload reactivity when ssr: false (#27542 )
  • nuxt: Only log warning once per runtimeConfig key (9e56b60c6 )
  • nuxt: Overwrite #app/defaults rather than augmenting (#27567 )
  • nuxt: Export useRouteAnnouncer (#27562 )
  • nuxt: Remove backticks around runtimeConfig warning log (#27549 )
  • nuxt: Close top-level watcher on nuxt 'close' (#27571 )
  • nuxt: Handle tsx code when extracting pageMeta/routeRules (#27583 )
  • nuxt: Handle more edge cases with external/custom links (#27487 )
  • nuxt: Preserve route metadata assigned outside page (#27587 )
  • nuxt: Use portal to sync nitro/nuxt runtimeConfig + routeRules (#27596 )
  • nuxt,schema: Add types for _installedModules (e4bfea642 )
  • nuxt: Include build-time pages in prerender routes (#27569 )
  • nuxt: Warn when async data doesn't return a value (#27599 )
  • nuxt: Replace deprecated app.rootId with app.rootAttrs.id (#27630 )
  • nuxt: Add mergeProps import in islands transform (#27622 )
  • nuxt: Reset cookie timeoutLength after expiration (#27632 )
  • nuxt: Add missing island uid for selective client components (#27633 )
  • schema,vite: Respect vite.cacheDir if defined (#27628 )
  • nuxt: Unregister hooks the moment close is called (#27637 )
  • nuxt: Add missing script stubs (#27640 )
  • nuxt: Only inject root path in prerender (44cada95a )
  • nuxt: Reduce usage of cjs utilities (#27642 )
  • nuxt: Add / even if pages module isn't enabled (dabcb5ecc )

📖 Documentation

  • Add warning about bridge migration with head (#27575 )
  • Update compatibility example (4b28d2628 )
  • Document new clear() function added in 3.11 (#27615 )
  • String vs object errors + accessing data of server-thrown errors (#27398 )
  • Correct Cloudflare deployment recommendations (#27641 )

🏡 Chore

✅ Tests

  • Add type test for nuxt module resolved types (115fc2d18 )

🤖 CI

❤️ Contributors

バージョン v3.12.1

リリース日 2024年6月11日

3.12.1 is a hotfix release to address a typo in the nuxt/script stub auto-imports.

👉 Changelog

compare changes

🩹 Fixes

  • nuxt: Update registry list for @nuxt/scripts (0252000d7 )

💅 Refactors

  • schema: Use CompatibilityDateSpec (#27521 )

📖 Documentation

  • Update more references to v3.12 (1d2eee00d )
  • Mention 3.12 for testing nuxt 4 (#27525 )

🏡 Chore

✅ Tests

❤️ Contributors

バージョン v3.12.0

リリース日 2024年6月11日

👀 Highlights

We're on the road to the release of Nuxt 4, but we've not held back in Nuxt v3.12. A huge thank you to the 75+ Nuxt contributors and community members who have been part of this release. ❤️

🚀 Testing Nuxt 4 changes

Nuxt 4 is on the horizon, and it's now possible to test out the behaviour changes that will be coming in the next major release (#26925 ) by setting an option in your nuxt.config file:

export default defineNuxtConfig({
  future: {
    compatibilityVersion: 4,
  },
})

As we've been merging PRs for Nuxt 4, we've been enabling them behind this flag. As much as possible we're aiming for backwards compatibility - our test matrix is running the same fixtures in both v3 and v4 compatibility mode.

There is a lot to say here, with 10+ different PRs and behaviour changes documented and testable, but for full details, including migration steps, see the v4 upgrade documentation .

We'd be very grateful for early testing of what's coming in Nuxt 4! 🙏

📜 Nuxt Scripts auto-install

We've been gradually working to release Nuxt Scripts . It's currently in public preview, but we're near a public release, so we've added some stubs for composables that (when used) will prompt installing the @nuxt/scripts module.

👉 Watch out for the launch - and an article explaining more!

🌈 Layer auto-registration and bugfixes

Just like ~/modules, any layers within your project in the ~/layers directory will now be automatically registered as layers in your project (#27221 ).

We also now correctly load layer dependencies, which should resolve a range of issues with monorepos and git installations (#27338 ).

🌐 Built-in accessibility improvements

We now have a built-in <NuxtRouteAnnouncer> component and corresponding useRouteAnnouncer composable, which will be added by default to new Nuxt templates going forward.

For full details, see the original PR (#25741) and documentation .

We're continuing to work on nuxt/a11y - expect to hear more on that in future!

🔥 Performance improvements

We've landed some performance improvements as well, many of which are behind the compatibilityVersion: 4 flag, such as a move away from deeply reactive asyncData payloads.

Significant improvements include deduplicating modules (#27475 ) - which will apply mostly to layer users who specify modules in their layers. In one project, we saw 30s+ improvement in starting Nuxt.

We've also improved Vite dev server start up time by excluding common ESM dependencies from pre-bundling, and would suggest module authors consider doing the same (#27372 ).

We improved chunk determinism, so sequential builds should be less likely to have completely different chunk hashes (#27258 ).

And we tree shake more client-only composables from your server builds (#27044 ), and have reduced the size of server component payloads (#26863 ).

👨‍👩‍👧‍👦 Multi-app support

We've landed a couple of changes that take us toward a place of supporting multi-app natively in Nuxt, including a multiApp experimental flag (#27291 ) and the ability to have multiple Nuxt app instances running in parallel at runtime (#27068 ).

While it's not yet ready, please do follow along on the tracker issue , and feel free to pitch in if this is interesting to you.

⛑️ DX wins

We now serialise more things in your dev server logs, including VNodes (#27309 ) and URLs . We also addressed a bug that could lead to a frozen dev server.

When accessing private runtime config in the browser, we now let you know with a more informative error message (#26441 ).

🪨 Stabilising features

We've removed some experimental options that have been stabilised and which we feel no longer need to be configurable:

  • experimental.treeshakeClientOnly (enabled by default since v3.0.0)
  • experimental.configSchema (enabled by default since v3.3.0)
  • experimental.polyfillVueUseHead (disabled since v3.4.0) - implementable in user-land with plugin
  • experimental.respectNoSSRHeader (disabled since v3.4.0) - implementable in user-land with server middleware

We've also enabled scanPageMeta by default (#27134 ). This pulls out any page metadata in your definePageMeta macro, and makes it available to modules (like @nuxtjs/i18n) so they can augment it.

This unlocks much better module/typed routing integration, but has a potential performance cost - so please file an issue if you experience any problems.

💪 Type improvements

We now have support for typed #fallback slots in server components (#27097 ).

We've also improved some defaults in your generated tsconfig.json, including setting module: 'preserve' if you have a locally installed TypeScript v5.4 version (see docs ) - see #26667 , #27485 .

📦 Module author/power user improvements

We have shipped a range of type improvements for module authors, including:

  • support for typed module options in installModule (#26744 )
  • the option to specify compatibility with certain builders (vite/webpack) in module options (#27022 )
  • a new onPrehydrate hook for hooking into the browser hydration cycle (#27037 )
  • the ability to access and update resolved runtime configuration within modules, with new build-time useRuntimeConfig and updateRuntimeConfig utils (#27117 )

🎨 Inlined UI templates

If you previously used @nuxt/ui-templates then it may be worth knowing that we have moved them from a separate repository into the nuxt/nuxt monorepo. (This is purely a refactor rather than a change, although you can expect some new designs for Nuxt v4.)

✅ Upgrading

As usual, our recommendation for upgrading is to run:

npx nuxi@latest upgrade --force

This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.

👉 Changelog

compare changes

🚀 Enhancements

  • nuxt: Support passing options to useRequestURL (#26687 )
  • nuxt: Introduce imports.scan option (#26576 )
  • nuxt: Add <NuxtRouteAnnouncer> and useRouteAnnouncer (#25741 )
  • kit: Handle virtual files in resolvePath and findPath (#26465 )
  • nuxt: Expose useLink from NuxtLink (#26522 )
  • schema: V4 opt-in with future.compatibilityVersion (#26925 )
  • nuxt,schema: Inline error, welcome, spa-loading templates (#27021 )
  • nuxt: Configurable app.rootAttrs and teleportAttrs (#27014 )
  • schema: Enable cookieStore by default (f597ca59a )
  • nuxt,schema: Support new Nuxt folder structure (#27029 )
  • nuxt: Treeshake onUpdated and onUnmounted on server (#27044 )
  • nuxt: Prompt to install nuxt/scripts on usage (#27010 )
  • nuxt: Expose default slot from <NuxtPage> (#27050 )
  • nuxt: Custom renderSSRHeadOptions config for unhead (#26989 )
  • nuxt: Add onPrehydrate lifecycle hook (#27037 )
  • nuxt: Support multiple nuxtApps at runtime (#27068 )
  • nuxt: Add #fallback slot to server components types (#27097 )
  • nuxt: Allow specifying builder compatibility in modules (#27022 )
  • kit: Add useRuntimeConfig and updateRuntimeConfig utils (#27117 )
  • schema: Remove some experimental options for v4 (#27132 )
  • nuxt: Auto-register layers in layers/ directory (#27221 )
  • nuxt: Allow displaying error state in loading indicator (#27176 )
  • nuxt,schema: Add appId and improve chunk determinism (#27258 )
  • nuxt: Check schema/kit versions when loading nuxt (#27224 )
  • schema: Add experimental multiApp flag (#27291 )
  • nuxt: Respect defaults when clearing asyncData (#27295 )
  • nuxt: Display banner when run with compatibilityVersion (#27305 )
  • nuxt: Add URL serialiser for dev server logs (a549b46e9 )
  • nuxt: Handle nuxt route injection for this.$route (#27313 )
  • nuxt: Allow configuring interval for checking app update (#27324 )
  • nuxt: Warn when accessing private runtimeConfig on client (#26441 )
  • kit: Support typed module options in installModule (#26744 )
  • kit,schema: Add .with for better module options types (#26850 )
  • nuxt: Register plugin hooks before executing plugins (#27449 )
  • nuxt,schema: Add compatibilityDate flag for future (#27512 )

🔥 Performance

  • nuxt: Don't add client fallback plugin if not enabled (#26666 )
  • nuxt: Unsubscribe from asyncData watch when unmounted (#26821 )
  • nuxt: Remove state from nuxt island response (#26863 )
  • nuxt: Emit simpler functional ui templates (w/o lodash) (#27091 )
  • ui-templates: Don't emit message data for pure strings (9b1bfe69e )
  • nuxt: Remove ssrContext.styles reference (from unused vue-style-loader) (2d1ab61b2 )
  • nuxt: Mark payload as shallowReactive (#27214 )
  • nuxt: Abort vue render when plugins throw error (#27304 )
  • vite: Exclude common ESM deps from pre-bundling (#27372 )
  • kit,nuxt: Remove handling for node 14 perf api (#27396 )
  • nuxt: Deduplicate modules to install (#27475 )
  • webpack: Decrease iteration count and improve type safety (#27488 )

🩹 Fixes

  • nuxt: Prevent getCachedData from shaping type of useAsyncData (#25946 )
  • nuxt: Encode location header in navigateTo (#26712 )
  • nuxt: Correctly remove extension from path in hasSuffix (#26725 )
  • nuxt: Hint prerenderer to crawl routes at runtime (#26694 )
  • kit: Ignore negation when resolving ignore patterns (e105fadd7 )
  • nuxt: Avoid double-slash in ignore pattern (75e43ac42 )
  • kit: Set typescript moduleDetection to 'force' (#26667 )
  • nuxt: Re-initialise nuxt._ignore after all modules run (#26680 )
  • nuxt: Assign v-for to slot in islands (#26880 )
  • nuxt: Don't encode location header (#26893 )
  • nuxt: Check if _scope is active before calling run function (#26756 , #26904 )
  • nuxt: Don't scan component dirs when enabled is false (#26906 )
  • vite: Inline styles for vue components with lang="ts" (#26912 )
  • nuxt: Handle arrays correctly in updateAppConfig (#26949 )
  • nuxt: useState in NuxtClientFallback setup function (#26928 )
  • nuxt: Compile plugin templates last (#27009 )
  • nuxt: Register redirect middleware before pushing route (#27016 )
  • nuxt,schema: Remove .js extension from template imports (0d4a622f3 )
  • nuxt: Don't overwrite existing scope in runWithContext (#26976 )
  • schema: Use v3 folder structure if app.vue exists in rootDir (1af81ed0f )
  • nuxt: Use resolved path for test component import (8e793ad5c )
  • nuxt: Use URL constructor to resolve external protocols (5f0693a69 )
  • nuxt: Use URL for parsing URLs rather than parseURL (ea22d3f98 )
  • nuxt: Deprecate process.* flags (#27089 )
  • nuxt: Provide default url for URL constructor (8bdd620ba )
  • nuxt: Preload links with same hostname (c065505e1 )
  • nuxt: Remove unused prop in NuxtTeleportIslandComponent (#27093 )
  • nuxt: Don't pass options to spaLoadingTemplate function (0e12b6eb8 )
  • nuxt: Scan folder indices for middleware (#27187 )
  • nuxt: Pass path to jiti and not file URL (#27252 )
  • schema: Hoist `@nuxt/devtools types for config auto-completion (008a26417 )
  • nuxt: Correct components dir regexp (dad89c2b1 )
  • schema: Handle dev/test buildId in schema (#27274 )
  • nuxt: Encode location header in navigateTo (#27280 )
  • nuxt: Invert version check (e5649613c )
  • nuxt: Exempt equality check for kit/schema version (a531e6f46 )
  • nuxt: Use undefined rather than null for data fetching defaults (#27294 )
  • vite: Ignore query/hash when resolving public assets (#27306 )
  • nuxt: Clear timeout when asyncData request finishes/aborts (#27308 )
  • nuxt: Provide default data type values in nuxt/app dir (#27314 )
  • nuxt: Add module declarations for virtual files (#27311 )
  • nuxt: Respect app.cdnURL for extracted payloads (#26668 )
  • vite: Handle runtime paths in inlined styles (#27327 )
  • nuxt: Add VNode reviver & don't deduplicate dev logs (#27309 )
  • vite: Suppress warning about unresolved public assets (#27328 )
  • nuxt: Defer shared asyncData promises to next tick (#27329 )
  • nuxt: Resolve modules from layers directories (#27338 )
  • schema: Pass correct jsx config for esbuild-loader (#27341 )
  • nuxt: Transpile app.config files in nitro build (#27342 )
  • nuxt: Use relative paths in app.config.d.ts (#27350 )
  • vite: Disable optimizeDeps in ssr (#27356 )
  • vite: Don't get available port when hmr.server is set (#27326 )
  • nuxt: Mark nuxt/scripts stubs as lower priority (51740fa1d )
  • nuxt: Handle errors loading app manifest (#27441 )
  • schema: Exclude non-serialisable types from app options (#27478 )
  • nuxt: Deduplicate app.head arrays (#27480 )
  • kit: Improve defaults in generated tsconfig.json (#27485 )
  • nuxt: Use buildAssetsDir in island teleport dev chunk (#27469 )
  • kit: Do not use module: preserve unelss ts v5.4 is installed (b08dfc98b )
  • nuxt: Ensure payload script executes before entry (#27506 )
  • kit: Avoid fallback to normalized path in module loading (#27507 )
  • nuxt: Also augment page metadata after pages:extend hook (#27134 )
  • nuxt: Resolve full path to app manifest stub page (91685a5b2 )
  • nuxt: Resolve paths without file extensions (dccf2e5f3 )
  • kit: Revert back to esnext target (7bb02735e )
  • kit,schema: Revert changes to module options types (#26850 )
  • nuxt: Remove boolean value for dedupe in v4 compat (#27511 )
  • nuxt: Add parent scopeId to server components (#27497 )
  • nuxt: Handle symbol keys in wrapped runtime config (13fec55c1 )
  • nuxt: Register augmented pages to avoid re-augmenting (b75bf870b )
  • nuxt: Use file path as key for re-augmenting (09f6a88e1 )

💅 Refactors

  • Improve regexp performance (#27207 )

📖 Documentation

  • Update Nuxt 4 scheduled release date (#26663 )
  • Remove step of installing deps in new nuxt project (#26676 )
  • Clarify dependsOn works not just for parallel plugins (#26707 )
  • Add --preset flag for nuxi build (#26759 )
  • Fix typo (#26752 )
  • Remove misleading reference to useFetch (#26748 )
  • Update the code style page (#26792 )
  • Reference correct composable in callWithNuxt (#26771 )
  • Add sample app.vue (#26796 )
  • Remove direct link to subheading (#26775 )
  • Fix srcDir description mentioning deprecated static/ directory (#26804 )
  • Provide example of passing props to a child page (#26805 )
  • Provide example of exposing a pageRef from a child page (#26806 )
  • Correct definePageMeta scrollToTop docs link (#26829 )
  • Advise correct extension for vitest config (#26845 )
  • Deprecate pending value in data fetching composables (#26766 )
  • Fix file name (#26852 )
  • Add info about self-hosted github/gitlab instances (#26501 )
  • Add @vue/test-utils getting started guide (#26205 )
  • Add a note about HTTPS with a self-signed certificates (#26481 )
  • Clarify purpose of play online section (#25978 )
  • Fix typo with a -> an (#26856 )
  • Fix code block formatting (#26859 )
  • Add more detail to usePreviewMode explanation (#26602 )
  • Fix import of defineConfig (a60de743a )
  • Add @since annotations to exported functions (#25365 )
  • Add watch example link (#26818 )
  • Add source tag (#26884 )
  • Update strict checks section with new default (#26965 )
  • Correct link to data fetching docs (#26988 )
  • Add link to one of @manniL 's videos on layers (#26984 )
  • Fix small typo (#26999 )
  • Preprocessors as dev deps to align with vue plugin (#27005 )
  • Change .eslintrc.js to eslint.config.js (#27020 )
  • Add docs for future.compatibilityVersion (e7789a257 )
  • Add vite plugin recipe (#27043 )
  • Improve data fetching wording and explanation (#27061 )
  • Add missing options for nuxi init (#27051 )
  • Update docs for ignorePrefix to clarify ignored files (#27065 )
  • Mention nightly release channel for unreleased features (8fcf893f8 )
  • Add migration/testing guide for nuxt 4 (#27128 )
  • Improve testing component examples (#27138 )
  • Fix type checking of component testing blocks (b5e35e3bd )
  • Add app.config.ts to nuxt 4 testing/migration (#27164 )
  • Add video links for more context (#27174 )
  • Add module execution order (#27178 )
  • Mark bridge as stable (#27212 )
  • Explain how environment variables work in production (#27189 )
  • Add cache option to useFetch params (#27225 )
  • Add custom useFetch recipe (#27208 )
  • Add nuxt/scripts (#27229 )
  • Add example of passing params to <NuxtLink> (#27284 )
  • Add additional example for setting baseURL and cdnURL (#27273 )
  • Update readme for Nuxt 2 NES and support (d35e9cd3f )
  • Introduce hint and link to environment override feature (#27315 )
  • Document partitioned attribute of useCookie (#27297 )
  • Add windows git clone symlink tip (#27332 )
  • Fix release badges (#27355 )
  • Fix list spacing (#27366 )
  • Capitalize text (#27348 )
  • Added recipe for consuming SSE via POST request (#27422 )
  • Add deployment advice for client-side rendering (#27426 )
  • Add external parameter behavior navigateTo (#27472 )
  • Add note about middleware re-running for error pages (#27481 )
  • Update link to nitro error hook type (61766702c )
  • Add comment about existing custom srcDir in upgrade steps (3383a2df2 )
  • Add docs page for prerendering (#27286 )

📦 Build

  • nuxt: Use relative path to ui-templates dist (99dc3ce88 )
  • schema: Use relative path to ui-templates dist (eec84f5b2 )
  • ui-templates: Directly copy templates on build (#27430 )
  • ui-templates: Fix svg regexp (957dcc194 )

🏡 Chore

✅ Tests

🤖 CI

  • Avoid running some actions on forks (#26937 )
  • Allow ui-templates as valid scope (5afd75b88 )
  • Use commit hash at time of release triggger (b78817001 )
  • Remove nightly nuxt 2 releases (bf4e6c536 )

❤️ Contributors

バージョン v3.11.2

リリース日 2024年4月4日

3.11.2 is the next 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: Don't tree-shake useServerHead in dev (#26421 )
  • nuxt: Reduce nuxt island payload (#26569 )
  • nuxt: Unsubscribe from watch when scope is disposed (#26554 )
  • nuxt: Reduce router resolutions (#26519 )

🩹 Fixes

  • nuxt: Handle underscores in island names (#26370 )
  • nuxt: Don't append new route for redirect if one exists (#26368 )
  • nuxt: Ignore navigateTo open option on server side (#26392 )
  • nuxt: Print errors when compiling templates (#26410 )
  • nuxt: Don't warn about definePageMeta in server pages (#26422 )
  • nuxt: Pass joinRelativeURL + share paths on server (#26407 )
  • nuxt: Exclude <srcDir>/index.html from import protection (#26430 )
  • nuxt: Early return from refreshCookie on server (22ada37b4 )
  • nuxt: Move v-if to wrapper in islands transform (#26386 )
  • nuxt: Move directives to client component island wrapper (#26387 )
  • nuxt: Ignore fetch errors in getLatestManifest (#26486 )
  • nuxt: Check island element instead of hydration state (#26480 )
  • nuxt: Add build id to rendered payload url (#26504 )
  • nuxt: Support serialising rich server logs (#26503 )
  • nuxt: Handle errors parsing/stringifying logs (4a87c35df )
  • nuxt: Augment GlobalComponents in multiple vue modules (#26541 )
  • nuxt: Suppress warning about resolve cache-driver (#26595 )
  • nuxt: Handle auto-importing named components (#26556 )
  • schema: Update webpack transformAssetUrls + pass hoistStatic to vite plugin (#26563 )
  • schema: Document use case for typescript.shim (#26607 )
  • nuxt: Normalise rollup opts in island transform w/o nuxt (#26589 )
  • nuxt: Handle missing Nuxt context in useRoute (#26633 )

💅 Refactors

  • nuxt: Remove duplicated check (#26544 )
  • nuxt: Simplify check in navigateTo for server (#26546 )
  • nuxt: Simplify runtimeConfig initialization of client side (#26558 )

📖 Documentation

  • Update information about playwright test runner (8e635fd23 )
  • Add info about dependencies to install (a258bfc34 )
  • Add missing end block (f55f74798 )
  • Migration page typo (#26389 )
  • Advise installing nuxi for debugging with pnpm (#26447 )
  • Warn about single root element for server components (#26462 )
  • Adjust grammar (#26482 )
  • Add contents of the layout in examples (#26532 )
  • Add note about prerenderRoutes in dynamic routes (#26547 )
  • Clarify app-config merging strategy note (#26564 )
  • Update core modules roadmap (#26553 )
  • Replace process.* with import.meta.* (#26611 )
  • Correct grammar in typescript.shim JSDoc (#26626 )
  • Add missing comma (#26644 )

🏡 Chore

❤️ Contributors

バージョン 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

バージョン v2.18.1

リリース日 2024年6月28日

👉 Changelog

compare changes

🩹 Fixes

  • webpack: Depend on earlier version of mkdirp (f67056b9e )

❤️ Contributors

バージョン v2.18.0

リリース日 2024年6月27日

👉 Changelog

compare changes

🚀 Enhancements

  • webpack: Migrate to memfs (#27652 )

🩹 Fixes

  • vue-app: Don't throw if we can't read sessionStorage (#27662 )
  • config: Add back md4 monkey-patch for wider ecosystem (#27865 )

🏡 Chore

❤️ Contributors

バージョン v2.17.4

リリース日 2024年6月14日

👉 Changelog

compare changes

🩹 Fixes

  • types: Bump serve-static types to v1.15.7 (1c44c376d )
  • generator: Use maintained html-minifier-terser (#26914 )
  • vue-app: Prevent double page mount (#10874 )
  • core: Don't skip loading runtime modules if one is improperly resolved (#10193 )
  • vue-app: Prevent error page mounting twice (#27484 )

🏡 Chore

✅ Tests

  • Properly close page in e2e tests (1700aa131 )
  • Wait for navigation in redirect test (e74715606 )
  • Don't register promise in external nav (#27468 )

🤖 CI

❤️ 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