PackageTrack

npm · #4082

@nuxt/kit

4.5.2nuxt/nuxt

Toolkit for authoring modules and interacting with Nuxt

Release timeline

151 releases since 2021
20222023202420252026

Releases

  1. 3.15.429 Jan 2025
    Release notes

    3.15.4 is the next 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

    🩹 Fixes

    • nuxt: Improve error logging when parsing with acorn (#30754)
    • nuxt: Clear island uid before saving into the payload (#30767)
    • kit: Load @nuxt/schema from nuxt package dir (#30774)
    • nuxt: Allow restarting nuxt on paths outside srcDir (#30771)
    • nuxt: Don't warn about calling useRoute in SFC setup (#30788)
    • webpack: Disallow cross-site requests in no-cors mode (#30757)
    • vite: Restore externality for dev server externals (#30802)

    💅 Refactors

    • vite: Use new rollup chunk.names for asset names (#30780)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Peter Radko (@Gwynerva)
    • Lansi (@lansi951)
    • Julien Huang (@huang-julien)
    • Norbiros (@Norbiros)
    Open source →
  2. 3.15.324 Jan 2025
    Release notes

    3.15.3 is the next regularly scheduled patch release.

    👀 Highlights

    CORS configuration for dev server

    Alongside a range of improvements, we've also shipped a significant fix to impose CORS origin restrictions on the dev server. This applies to your Vite or Webpack/Rspack dev middleware only.

    This is a significant/breaking change we would not normally ship in a patch but it is a security fix (see https://github.com/nuxt/nuxt/security/advisories/GHSA-4gf7-ff8x-hq99 and https://github.com/nuxt/nuxt/security/advisories/GHSA-2452-6xj8-jh47) and we urge you to update ASAP.

    You can configure the allowed origins and other CORS options via the devServer.cors options in your nuxt.config, which may be relevant if you are developing with a custom hostname:

    export default defineNuxtConfig({
      devServer: {
        cors: {
          origin: ['https://custom-origin.com'],
        },
      },
    })
    

    ✅ 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,nuxt: Don't resolve paths from local layers/modules (#30650)
    • nuxt: Reduce number of mkdirSync calls (#30651)
    • nuxt: Reduce unnecessary template updating (#30684)
    • kit: Reduce duplication between findPath and resolvePath (#30682)
    • kit: Run components compat check synchronously (#30685)
    • nuxt: Early return from annotation for non-object syntax plugins (#30683)
    • nuxt: Enable Transition component only on client side (#30720)

    🩹 Fixes

    • vite: Override previous #app-manifest alias (#30618)
    • kit,nuxt,schema,vite: Improve watching behaviour (#30620)
    • nuxt: Fall back to plugin.src for variable name generation (#30649)
    • schema: Allow overriding dev/test environment value (#30667)
    • vite: Drop unneeded call to invalidate module (d2a95c542)
    • vite: Add back invalidateModule call (9bd71e498)
    • nuxt: Do not warn about [[ optional dynamic params (#30619)
    • vite: Inline shared folder in dev mode (#30690)
    • nuxt: Deep clone extracted page meta (#30717)
    • vite,webpack: Restrict access via cors to local origins + allow configuration via devServer.cors (406db5b4d)

    💅 Refactors

    • vite: Drop externality and use vite internal config (#30634)

    📖 Documentation

    • Add link to custom useFetch example (#30629)
    • Fix example command (#30628)
    • Fix links to nuxi source code (4fabe0025)
    • Add description for prefetch and other details of NuxtLink (#30614)
    • Update nuxt/content example (542987627)
    • Adjust examples, type and description for addRouteMiddleware (#30656)
    • Explain how to use ClientOnly with onMounted hook (#30670)
    • Update links to unhead source (eb5344b43)
    • Add more context about navigation mode in callOnce composable (#30612)
    • Add example on how to disable default routes for ssg (#30729)

    📦 Build

    • schema: Use new inlineDependencies option (01adefcec)

    🏡 Chore

    🤖 CI

    • Run bundle size assertion outside of matrix (#30688)
    • Reenable nuxt benchmarking (#30711)

    ❤️ Contributors

    • Alex Liu (@Mini-ghost)
    • Daniel Roe (@danielroe)
    • Alan Schio (@schirrel)
    • xjccc (@xjccc)
    • Saeid Zareie (@Saeid-Za)
    • Zakhar Shymanchyk (@zshimanchik)
    • Arturs Jansons (@iegik)
    • Maxime Pauvert (@maximepvrt)
    Open source →
  3. 3.15.215 Jan 2025
    Release notes

    3.15.2 is the next regularly scheduled patch release.

    👀 Highlights

    🔥 Startup performance improvements

    It is worth noting that this release includes some pretty significant performance improvements which you should notice particularly in the startup time. In my tests in the nuxt monorepo,

    fixture time to vite build complete (v3.15.1) time to vite build complete (v3.15.2)
    minimal 850ms 710ms
    everything bagel 3,021ms 1,690ms

    There's more improvement to do here but hopefully these are good numbers!

    📦 CLI refactor

    To improve performance within Nuxt projects, we've published a new @nuxt/cli distribution of nuxi, which is used under-the-hood in nuxt (see issue). This should behave exactly the same and nothing needs to be updated in your projects (for example, you will continue to use the nuxi or nuxt commands). The only significant change is that it no longer inlines dependencies. Feedback is welcome 🙏

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    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

    • nuxt: Remove code duplication in client-only (#30460)
    • nuxt: Use lighter @nuxt/cli dependency (#30526)
    • kit: Remove iterations when resolving module path (#30562)
    • nuxt: Avoid checking fs for existence of scanned pages (#30581)
    • nuxt: Defer version/config warnings to after build (#30567)

    🩹 Fixes

    • nuxt: Collect all identifiers before extracting page metadata (#30478)
    • nuxt: Don't hoist identifiers declared locally in definePageMeta when extracting page metadata (#30490)
    • kit: Reorder #build to the end of tsConfig paths (#30520)
    • nuxt: Use fullPath instead of empty string in router hmr (#30500)
    • Relax nuxt version constraints to current (23b968289)
    • nuxt: Add import protection for @nuxt/cli (618bbc6da)
    • kit: Fully resolve plugin paths when normalising them (#30540)
    • nuxt: Call page:loading:end only once with nested pages (#29009)
    • nuxt: Warn about ignored char while parsing route segment (#30396)
    • nuxt: Allow url-specific chars in vfs (#30584)
    • nuxt: Do not warn about invalid characters in route groups/catchalls (0249c74bc)
    • vite: Provide fallback alias for #app-manifest (#30587)
    • nuxt: Avoid invoking shouldPrefetch on the server side (#30591)
    • nuxt: Decode id before resolving relative imports (#30599)

    💅 Refactors

    • kit,nuxt,webpack: Reduce reassignments (#30589)

    📖 Documentation

    • Document --dev option for the module command (#30477)
    • Document the add layer command (#30476)
    • Update v4 release date (#30514)
    • Ensure correct type for url in useFetch (#30531)
    • Update link to @nuxt/module-builder source (509cf4a5c)
    • Add status detail and enhance getCachedData readability (#30536)
    • Update hash link to correct heading (#30543)
    • Update links to unhead source (fef3a59bb)
    • Adjust example and additional instructions of useNuxtData (#30570)
    • Resolve many twoslash errors (#30573)
    • Add context for useAsyncData side effects (#30479)
    • Update examples to use function declarations for clarity (#30588)

    🏡 Chore

    • Control dependency import into nuxt/app (1adf3e31f)
    • Ignore automated renovate node engines updates (6895993fb)

    🤖 CI

    • Don't block release on fixtures + add pkg.pr.new (#30548)
    • Remove concurrency group from release-pr job (8ac54ff10)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Alex Liu (@Mini-ghost)
    • Anthony Fu (@antfu)
    • Camille Coutens (@Kamsou)
    • Julien Huang (@huang-julien)
    • Peter Buglavecz (@buglavecz)
    • ikxin (@ikxin)
    • Guspan Tanadi (@guspan-tanadi)
    • Vuk Marjanovic (@vmrjnvc)
    • Saeid Zareie (@Saeid-Za)
    • Matej Černý (@cernymatej)
    • Clément Ollivier (@clemcode)
    Open source →
  4. 3.15.15 Jan 2025
    Release notes

    3.15.1 is the next 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

    • nuxt: Skip experimental async context transform in client build (#30360)
    • schema: Drop unneeded type-only schema dependencies (#30411)
    • rspack,webpack: Drop lodash-es dependency (#30409)
    • nuxt: Drop pathe browser dep for deep server components (#30456)

    🩹 Fixes

    • nuxt: Update module path for defaults (#30371)
    • nuxt: Ignore non-reference identifiers when extracting page metadata (#30381)
    • nuxt: Pass nuxt instance to resolvePagesRoutes (e4a372e12)
    • schema: Support pfx certificate for dev server (#30412)
    • nuxt: Use node location instead of range for route meta property extraction (#30447)
    • schema: Override vueCompilerOptions.plugins type (#30454)
    • nuxt: Respect baseURL when ignoring prerendered manifest (#30446)
    • nuxt: Respect router.options when hmring routes (#30455)

    💅 Refactors

    • nuxt: Use consola with nuxt tag instead of console (#30408)

    📖 Documentation

    • Update references to lodash and recommend es-toolkit (8e2ca5bdc)
    • Add warning about prerendering (#30437)

    🏡 Chore

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Anders Bootsmann Larsen (@bootsmann1995)
    • Alexander Lichter (@TheAlexLichter)
    • Matej Černý (@cernymatej)
    • Connor Roberts (@murshex)
    • Julien Huang (@huang-julien)
    Open source →
  5. 3.15.024 Dec 2024
    Release notes

    👀 Highlights

    ❄️ Snowfall!

    Happy holidays! You'll notice when you start Nuxt that (if you're in the Northern Hemisphere) there's some snow on the loading screen (#29871).

    ⚡️ Vite 6 included

    Nuxt v3.15 includes Vite 6 for the first time. Although this is a major version, we expect that this won't be a breaking change for Nuxt users (see full migration guide). However, please take care if you have dependencies that rely on a particular Vite version.

    One of the most significant changes with Vite 6 is the new Environment API, which we hope to use in conjunction with Nitro to improve the server dev environment. Watch this space!

    You can read the full list of changes in the Vite 6 changelog.

    🪵 Chromium devtools improvements

    We talk a lot about the Nuxt DevTools, but v3.15 ships with better integration in dev mode for Chromium-based browser devtools.

    We now use the Chrome DevTools extensibility API to add support for printing nuxt hook timings in the browser devtools performance panel.

    🗺️ Navigation mode for callOnce

    callOnce is a built-in Nuxt composable for running code only once. For example, if the code runs on the server it won't run again on the client. But sometimes you do want code to run on every navigation - just avoid the initial server/client double load. For this, there's a new mode: 'navigation' option that will run the code only once per navigation. (See #30260 for more info.)

    await callOnce(() => counter.value++, { mode: 'navigation' })
    

    🥵 HMR for templates, pages + page metadata

    We now implement hot module reloading for Nuxt's virtual files (like routes, plugins, generated files) as well as for the content of page metadata (within a definePageMeta macro) (#30113).

    This should mean you have a faster experience in development, as well as not needing to reload the page when making changes to your routes.

    📋 Page meta enhancements

    We now support extracting extra page meta keys (likely used by module authors) via experimental.extraPageMetaExtractionKeys (#30015). This enables module authors to use this information at build time, in the pages:resolved hook.

    We also now support local functions in definePageMeta (#30241). This means you can do something like this:

    function validateIdParam(route) {
      return !!(route.params.id && !isNaN(Number(route.params.id)))
    }
    
    definePageMeta({
      validate: validateIdParam,
    })
    

    🔥 Performance improvements

    We now preload the app manifest in the browser if it will be used when hydrating the app (#30017).

    We'll also tree shake vue-router's hash mode history out of your bundle if we can - specifically, if you haven't customised your app/router.options.ts (#30297).

    🐣 v4 updates

    A few more changes shipped for the new defaults for v4, including only inlining styles by default for Vue components (#30305).

    ✅ 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

    • deps: Update dependency vite to v6 (3.x) (#30044)
    • kit: Allow module default options to be async (#29980)
    • nuxt: Add new types to vue preset (#29819)
    • nuxt: Experimental extraPageMetaExtractionKeys (#30015)
    • nuxt,schema: Allow setting serialisable vue app config (#28873)
    • nuxt: Print nuxt hook timings in browser devtools (#29922)
    • nuxt: Support vue directive auto-imports within unimport (#29818)
    • schema: Add snow effect on loading screen in winter (#29871)
    • nuxt: Support local functions in definePageMeta (#30241)
    • nuxt: Add mode: 'navigation' to callOnce (#30260)

    🔥 Performance

    • nuxt: Preload app manifest (#30017)
    • nuxt: Use static hashMode option (#30297)
    • vite: Use vite to clear screen (#30315)
    • schema: Only inline styles for vue components (#30305)
    • nuxt: Remove useId from composable key plugin (#30328)

    🩹 Fixes

    • nuxt: Check if nuxt link observer is null (#30038)
    • nuxt: Unref the default value of asyncData when clearing (#30041)
    • kit: Re-export addServerTemplate (a02af2348)
    • Remove unused dependencies and tidy project (#30043)
    • vite: Add back some dev-bundler dependencies (976024f16)
    • nuxt: Do not persist extraExtractionKeys on runtime route.meta (ae9f42f4a)
    • nuxt: Allow array/object style value for head components (#29999)
    • nuxt: Tidy up remnants of previous useId implementation (40f437d25)
    • kit,nuxt: Provide buildDir to normalizeTemplate (#30115)
    • kit: Add better logging for non-resolved modules (#30116)
    • nuxt: Correct return type of useRequestFetch (#30117)
    • nuxt,vite: Hmr for templates, pages + page metadata (#30113)
    • nuxt: Use nitropack rather than nitro import (2d5b53b23)
    • kit: Use resolved module paths for transpile + modulesDir (#30136)
    • Update engines.node to match dependencies (#30139)
    • schema: Allow routerOptions.history to return null (#30192)
    • nuxt: Render client page directly when not hydrating (#30061)
    • nuxt: Use useId for island client component teleport id (#30151)
    • nuxt: De-default async layout components (#30203)
    • nuxt: Correct types for nuxt and nuxt/app (#30148)
    • nuxt,schema: Allow showing spa loader til after hydration (#29776)
    • nuxt: Remove whitespace around spa loading template (070bd103c)
    • nuxt: Hoist environment types (#30230)
    • schema: Hoist nitro runtime types (73761dade)
    • nuxt: Ensure getRouteRules works with nitro signature (#30277)
    • nuxt: Respect replace in middleware with navigateTo (#30283)
    • nuxt: Update import paths for nitropack (f220314a5)
    • nuxt: Don't use <RouterLink> for links starting with # (#30190)
    • vite: Ignore optimising #app-manifest (ec613e533)
    • nuxt: Use useId for client-fallback component uid (#30314)
    • schema: Gate inline style change behind v4 check (ceac86e34)
    • nuxt: Do not resolve deep imports for @vitest/ (4171a1076)
    • kit: Initialize tsconfig paths in addTemplate if undefined (#30348)
    • nuxt: Treat client useAsyncData calls as async boundaries (#30343)
    • nuxt: Initialise import.meta.hot.data (b1cf5781d)

    💅 Refactors

    • Move composable-keys plugin into nuxt core (#30029)
    • nuxt: Simplify and improve core plugins that parse ast (#30088)
    • nuxt: Prefix all core modules with nuxt: (#30028)

    📖 Documentation

    • Remove extra new line in frontmatter (#30031)
    • Text capitalization for titles (#30054)
    • Mention that type checking can happen in dev (#30012)
    • Fix typos in punctuation (#30006)
    • Remove duplicate information about preprocessor variables (#30002)
    • Format text case for consistency (#30073)
    • Add a section about event.waitUntil (#29583)
    • Improve wording (#30106)
    • Update configuration files format (#30087)
    • Update links to vite.dev (#30111)
    • Fix incorrect vite docs link (#30112)
    • Add note about using bun runtime (#30019)
    • Add giget limitation in nuxt layers documentation (#30122)
    • Correct vite link (#30135)
    • Add nuxi upgrade channel flag (#30184)
    • Add note about awaiting useLazyFetch (#30171)
    • Add missing comma in upgrade doc code sample (#30189)
    • Added options and option definitions for sourcemap (#30201)
    • Add shared directory documentation (#29816)
    • Document vite.css.preprocessorMaxWorkers (eb1ba017c)
    • Handle zero-length string (cf74b4c98)
    • Update nitro links + fix link checking (#30228)
    • Add a note about compatibilityVersion feature flag (#30274)
    • Update auto-imports to advertise the scan feature (#30292)
    • Update nuxi command pages (#30199)
    • Update migration documentation for inlineStyles (2660bffbc)
    • Add bluesky link (#30322)
    • Add recipe for session and authentication (#27287)
    • Fix filename for prerendering page (#30333)
    • Add spacing (#30331)

    🏡 Chore

    ✅ Tests

    • Add additional attw test for built packages (#30206)
    • Improve assertions for spa loading tests (80bd2d2ec)
    • Bump bundle size snapshot (d545f9e96)
    • Try to improve spa preloader tests (08219a502)
    • Ensure dev server is loaded before running tests (f66cf928e)

    🤖 CI

    • Ignore dev-dependencies for engines.node (e366a6feb)
    • Analyse github actions with codeql (#30293)
    • Exclude file that codeql cannot analyse (7e03b08a6)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Julien Huang (@huang-julien)
    • Mehmet (@productdevbook)
    • @beer (@iiio2)
    • Nishant Aanjaney Jalan (@cybercoder-naj)
    • David Nahodyl (@Smef)
    • Vuk Marjanovic (@vmrjnvc)
    • Alexander Lichter (@TheAlexLichter)
    • Bobbie Goede (@BobbieGoede)
    • Connor Roberts (@murshex)
    • Matej Černý (@cernymatej)
    • derHodrig (@derHodrig)
    • Martins Zeltins (@martinszeltins)
    • Matt (@matt-clegg)
    • Nikolay (@RokeAlvo)
    • Joaquín Sánchez (@userquin)
    • bjoaquinc (@bjoaquinc)
    • wzc520pyfm (@wzc520pyfm)
    • Kraig Burrows (@zync09)
    • Lucie (@lihbr)
    • Harlan Wilton (@harlan-zw)
    • 一纸忘忧 (@ikxin)
    • Sébastien LeBlanc (@mrleblanc101)
    • Teena (@franklin-tina)
    • skmedix (@skmedix)
    • Daniel Rentz (@danielrentz)
    • Inesh Bose (@ineshbose)
    • Felix Gabler (@felixgabler)
    • Damian Głowala (@DamianGlowala)
    • mianlang (@mianlang)
    • Tamás H. (@Tamas-hi)
    • xjccc (@xjccc)
    • Guillaume Chau (@Akryum)
    • Farnabaz (@farnabaz)
    Open source →
  6. 3.14.159219 Nov 2024
    Release notes

    3.14.1592 is the next patch release.

    👉 Changelog

    compare changes

    🩹 Fixes

    • rspack: Update webpackbar with support for rspack (#29823)
    • nuxt: Assign default name to component without setup (#29869)
    • kit: Use dst to deduplicate templates when adding them (#29895)
    • nuxt: Handle empty plugin files (d44408e87)
    • vite: Use resolved nuxt template dst to invalidate modules (6cd3352de)
    • nuxt: Return null map for empty plugin metadata (302a66da9)
    • kit: Resolve module paths before appending subpaths (#29955)
    • nuxt: Recompile templates on change events (#29954)
    • nuxt: Do not include <NuxtWelcome> when building (#29956)
    • nuxt: Allow scanning metadata from 2+ files at same path (#29969)
    • nuxt: Do not disallow importing nitro dependencies (#29975)

    💅 Refactors

    • nuxt: Define layouts as async vue components (#29957)

    📖 Documentation

    • Update custom environment example (e3759ad55)
    • Update minimal example (7973f5ed4)
    • Add tip about islands directory (#29913)
    • Fix typo in composable name (#29910)
    • Rename @nuxt/auth to @nuxt/auth-utils in roadmap (#29906)
    • Capitalize text (#29938)
    • Improve clarity in seo meta example (#29930)
    • Update getting started to include WebStorm (#29845)

    🏡 Chore

    • Remove unused imports and update eslint config (#29876)

    ✅ Tests

    🤖 CI

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Gustavo Aquino Torres Teixeira (@guska8)
    • Stephanie Smith (@stephiescastle)
    • @beer (@iiio2)
    • Maxime Pauvert (@maximepvrt)
    • crisarji (@crisarji)
    • RBV1 (@RBV1)
    • Adrien Foulon (@Tofandel)
    • Julien Huang (@huang-julien)
    • Horu (@HigherOrderLogic)
    • Jan-Niklas W. (@niklas-wortmann)
    Open source →
  7. 3.14.1596 Nov 2024
    Release notes

    3.14.159 is a hotfix release to address regressions in v3.14.

    We're leaning into the π theme - future patch releases of this minor version will just continue adding digits. (Sorry for any inconvenience! 😆)

    👉 Changelog

    compare changes

    🩹 Fixes

    • nuxt: Update nitropack preset directory (#29780)
    • kit: Fall back to meta version if there's no module.json (#29793)
    • kit: Use mlly to resolve module paths to avoid cjs fallback (#29799)
    • webpack,rspack: Add adapter for webpack-dev-middleware (#29806)
    • nuxt: Remove null-byte prefix for virtual files (#29809)
    • kit: Convert module path to file url before reading meta (fb833ac64)

    📖 Documentation

    • Capitalize titles (#29768)
    • Fix rou3 link in nitro.js (#29775)
    • Fix tip formatting (#29792)
    • Add link to h3 blogpost (#29794)
    • Remove outdated cloudflare tip (auto minify deprecated) (#29812)

    🏡 Chore

    • nuxt: Remove redundant type (#29810)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • xjccc (@xjccc)
    • Efraim (@EfraimGENC)
    • Aurion SARL (@Aurion72)
    • Erik Lilja (@Lilja)
    • Markus Oberlehner (@maoberlehner)
    • Lukas Bauer (@luxterful)
    • @beer (@iiio2)
    Open source →
  8. 3.14.04 Nov 2024
    Release notes

    3.14.0 is the next minor release.

    👀 Highlights

    Behind the scenes, a lot has been going on in preparation for the release of Nuxt v4 (particularly on the unjs side with preparations for Nitro v3!)

    ⚡️ Faster starts powered by jiti

    Loading the nuxt config file, as well as modules and other build-time code, is now powered by jiti v2. You can see more about the release in the jiti v2 release notes, but one of the most important pieces is native node esm import (where possible), which should mean a faster start. ✨

    📂 Shared folder for code and types shared with client/server

    You should never import Vue app code in your nitro code (or the other way around). But this has meant a friction point when it comes to sharing types or utilities that don't rely on the nitro/vue contexts.

    For this, we have a new shared/ folder (#28682). You can't import Vue or nitro code into files in this folder, but it produces auto-imports you can consume throughout the rest of your app.

    If needed you can use the new #shared alias which points to this folder.

    The shared folder is alongside your server/ folder. (If you're using compatibilityVersion: 4, this means it's not inside your app/ folder.)

    🦀 rspack builder

    We're excited to announce a new first-class Nuxt builder for rspack. It's still experimental but we've refactored the internal Nuxt virtual file system to use unplugin to make this possible.

    Let us know if you like it - and feel free to raise any issues you experience with it.

    👉 To try it out, you can use this starter - or just install @nuxt/rspack-builder and set builder: 'rspack' in your nuxt config file.

    ✨ New composables

    We have new useResponseHeader and useRuntimeHook composables (#27131 and #29741).

    🔧 New module utilities

    We now have a new addServerTemplate utility (#29320) for adding virtual files for access inside nitro runtime routes.

    🚧 v4 changes

    We've merged some changes which only take effect with compatibilityVersion: 4, but which you can opt-into earlier.

    1. previously, if you had a component like ~/components/App/Header.vue this would be visible in your devtools as <Header>. From v4 we ensure this is <AppHeader>, but it's opt-in to avoid breaking any manual <KeepAlive> you might have implemented. (#28745).

    2. Nuxt scans page metadata from your files, before calling pages:extend. But this has led to some confusing behaviour, as pages added at this point do not end up having their page metadata respected. So we now do not scan metadata before calling pages:extend. Instead, we have a new pages:resolved hook, which is called after pages:extend, after all pages have been augmented with their metadata. I'd recommend opting into this by setting experimental.scanPageMeta to after-resolve, as it solves a number of bugs.

    🗺️ Roadmap to v3.15

    They didn't quite make it in time for v3.14 but for the next minor release you can expect (among other things):

    • [ ] auto-imported directives from modules (#29203)
    • [ ] 'isolated' page renders (#29366)
    • [ ] delayed hydration (#26468)

    ✅ 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

    • deps: Upgrade to latest version of jiti (#27995)
    • kit,nuxt,vite,webpack: Reimplement cjs utils using jiti (#29073)
    • nuxt: Normalise component names to match nuxt pattern (#28745)
    • kit,schema: Add addServerTemplate utility (#29320)
    • nuxt: Add useResponseHeader composable (#27131)
    • rspack,webpack: Add rspack builder (#29142)
    • nuxt,schema: pages:resolved hook + scan meta post extend (#28861)
    • nuxt: Allow enabling route props in definePageMeta (#29586)
    • schema,nuxt: Add shared/ folder and #shared alias (#28682)
    • nuxt: Allow chunk error or manifest update -> reload (#28160)
    • nuxt: Add useRuntimeHook composable (#29741)

    🔥 Performance

    • nuxt: Remove unneeded second call to useNuxtApp (#29514)
    • vite: Avoid redundant postcss plugins overwrite (#29619)
    • kit,nuxt,vite,webpack: Hoist regex patterns (#29620)

    🩹 Fixes

    • nuxt: Simplify plugin InjectionType template conditional (#29023)
    • nuxt: Access server build from webpack memfs (#29027)
    • nuxt: Do not resolve non-absolute component paths (#29036)
    • nuxt: Defer unsetting error handler until suspense resolves (#29037)
    • nuxt: Pass DOMException as fetch abort exception (#29058)
    • vite: Don't force protocol if disabled devServer.https (#29049)
    • nuxt: Empty nitro buildDir in dev mode (#29068)
    • nuxt: Don't resolve relative import type paths for deps (#29069)
    • kit: Handle passing 'bare' relative paths to modules (c7fecd8a1)
    • kit: Try resolving module path from each node_modules dir (70a622d43)
    • kit,vite,webpack: Resolve postcss paths from each modules dir (#29096)
    • kit,vite,webpack: Strip node_modules/ from parent urls (5bd42c893)
    • nuxt: Add crossorigin attribute for stylesheets (#29138)
    • nuxt: Use routeRules to hint pages to prerender (#29172)
    • nuxt: Pass absolute external link urls to link:prefetch (#29321)
    • nuxt: Error on build when required module is missing (#29287)
    • nuxt: Prevent 404 when hitting component test endpoint (cb725f014)
    • nuxt: Avoid throwing 404 error before middleware finishes (#29054)
    • schema: Use ConfigLayer type from c12 (#29370)
    • nuxt: Fix nested page types in typedPages (#29352)
    • nuxt: Allow islands to manipulate head client-side (#29186)
    • vite: Dim repeat count in logs (#29392)
    • schema: Mark configFile as required in layer type (3bbcd7d21)
    • nuxt: Remove vue compiler hints from auto import (#29713)
    • vite: Update signature for createIsExternal (686be8168)
    • nuxt: Respect existing props value in definePageMeta (#29683)
    • schema: Hoist nitropack/types to ensure api routes are typed (54096875e)

    💅 Refactors

    • nuxt: Use addBuildPlugin internally (#29157)
    • nuxt,schema,vite,webpack: Use unplugin for vfs (#29165)

    📖 Documentation

    • Use defineNuxtComponent instead of defineComponent (#29011)
    • Remove duotone icons for clarity (#29040)
    • Fix typo (#29045)
    • Remove specific Nuxt 4 release date (#29151)
    • Remove redundant newlines and indentations (#29190)
    • Add links to short videos from daniel (#29185)
    • Fix comments typo in auto-imports example (#29195)
    • Add missing word (#29230)
    • Add a section about useRequestFetch and event.$fetch (#29099)
    • Add example of typing custom useFetch errors (#29253)
    • Ensure manifest code snippet works with pnpm (#29273)
    • Consistent directory structure (#29292)
    • Update to new ofetch headers for interceptors (#29118)
    • Mention upgrading third-party configs (#27768)
    • Improve explanation of ssr + data fetching (#29010)
    • Add a description for .env.test (#29398)
    • Add section on 'updateAppConfig' in the 'app.config' page (#29397)
    • Add example to navigateTo util (#29611)
    • Remove mockImplementation() call (#29669)
    • Update lifecycle hooks (#29678)
    • Type cast api plugin in custom usefetch example (#29756)
    • Correct some errors about proxying headers with $fetch (#29755)
    • Add information on --envName flag (#28909)
    • Add error expectation (09885b87e)

    📦 Build

    • ui-templates: Switch to beasties (1b5391182)

    🏡 Chore

    ✅ Tests

    • Bump bundle snapshot (e57e65c08)
    • Add basic assertions for unctx transform (d81196122)
    • Fix assertion for style snapshot (7f311e773)
    • Move catchall path to subdirectory (#29331)
    • Update snapshot for https://github.com/nuxt/nuxt/pull/28441 (a248f24f5)
    • Add compat code for vite v6 (#29677)

    🤖 CI

    • Rspack semantic scope (db65d2165)
    • Update lychee config (#29162)
    • Release dependency updates on nightly channel (271149bd2)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • xjccc (@xjccc)
    • Pooya Parsa (@pi0)
    • Damian Głowala (@DamianGlowala)
    • Till Sanders (@tillsanders)
    • Nils (@BracketJohn)
    • Estéban (@Barbapapazes)
    • John Tanzer (@moshetanzer)
    • Cruz (@SparK-Cruz)
    • Anthony Fu (@antfu)
    • 翠 / green (@sapphi-red)
    • Taras Batenkov (@enkot)
    • Michael Brevard (@GalacticHypernova)
    • Bobbie Goede (@BobbieGoede)
    • Panopoulos Andreas (@b0ul17)
    • Julien Huang (@huang-julien)
    • Dawit (@oneminch)
    • Ryota Watanabe (@wattanx)
    • Alexander (@hywax)
    • Ryoya (@harunari0928)
    • Jelmer (@jelmerdemaat)
    • Nishant Aanjaney Jalan (@cybercoder-naj)
    • Christoph Heike (@cheike569)
    • Sébastien Chopin (@atinux)
    • Jeremy Graziani (@AcelisWeaven)
    • Domenik Reitzner (@dreitzner)
    • Jeel Rupapara (@zeelrupapara)
    • Matej Černý (@CernyMatej)
    • Leopold Kristjansson (@leopoldkristjansson)
    • Horváth Bálint (@horvbalint)
    • 一纸忘忧 (@ikxin)
    • Bochkarev Ivan (@Ibochkarev)
    • Joschua (@selfire1)
    • Indrek Ardel (@Ingramz)
    • DarkVen0m (@DarkVen0m)
    • Ezra Ashenafi (@Eazash)
    Open source →
  9. 3.13.215 Sept 2024
    Release notes

    3.13.2 is the next 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

    • nuxt: Remove interop default for dynamic components (#28912)

    🩹 Fixes

    • nuxt: Fix ssr log querySelector (#28864)
    • schema: Enable propsDestructure by default (#28830)
    • nuxt: Ensure injected route has enumerable keys (#28841)
    • nuxt: Don't override vue instance with legacy asyncData (#28842)
    • nuxt: Render server errors with ssr: false (#28834)
    • nuxt: Resolve full component paths (#28843)
    • nuxt: Improve accuracy of module resolution conditions (#28846)
    • nuxt: Log more context of prerendering errors (#28895)
    • nuxt: Enable injectAtEnd to reduce circular auto-imports (#28822)
    • nuxt: Ensure we process files in buildDir for unimport (#28899)
    • nuxt: Do not accept attrs on <NuxtErrorBoundary> (#28901)
    • nuxt,schema: Accept any module in inline modules array (#28922)
    • nuxt: Fall back to original component filePath (#28925)
    • nuxt: Make runWithContext generic (#28926)
    • nuxt: Set inheritAttrs: false for fragment components (#28939)
    • nuxt: Use case-insensitive regexp for <script> blocks (4fd24381c)
    • nuxt: Ensure component imports are injected last (#28944)
    • nuxt: Catch chunk errors directly in navigation (820908696)
    • nuxt: Add missing isNuxtMajorVersion export (#29016)
    • nuxt: Correct type for useError (#28996)

    💅 Refactors

    • nuxt: Use vite:preloadError event (#28862)

    📖 Documentation

    • Add known limitations for app.config.ts (#28875)
    • Typo fixed missing closing angle bracket (#28880)
    • Update useFetch troubleshooting section (#28918)
    • Capitalize text (#28972)
    • Fix typo (#28983)
    • Add clarity to useFetch parameter signature (#28993)
    • Remove confusing reference to 'SPA' (#28991)

    🏡 Chore

    • Use consola to log out compatibility info (#28854)
    • vite: Use correct type import (3f508d521)
    • Enable noUncheckedSideEffectImports (#28903)
    • Add pending triage to blank issues (#28923)
    • Correct comment style (c4181b5a2)
    • Fix typos (462380d45)
    • Refresh lockfile, use htmlnano + pin workflow deps (#28946)
    • Pin dep + workflow by hash (4d81334c9)
    • ui-templates: Use class-selector (043329f52)

    ✅ Tests

    • Collect bundle sizes in parallel (1ce81069d)
    • Add regression test for using route in template (#28967)
    • Convert set to array (6ee3b3adc)
    • Switch inline snapshot to object comparison (ae5135363)

    🤖 CI

    • Access issue number from payload (8e4585c14)
    • Configure codeql to ignore tests (d5f98a757)
    • Add default permissions for workflows (3ede01cd4)
    • Scan source files with codeql (#28943)
    • Skip setting up node before codeql scan (c4d7c92e9)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Artem Maslov (@Twocram)
    • Paulo Ricardo Severo (@prsevero)
    • Nishant Aanjaney Jalan (@cybercoder-naj)
    • @beer (@iiio2)
    • Julien Huang (@huang-julien)
    • Liran Tal (@lirantal)
    • Anthony Fu (@antfu)
    • Osama Abdallah Essa Haikal (@OsamaHaikal)
    Open source →
  10. 3.13.14 Sept 2024
    Release notes

    3.13.1 is the next regularly scheduled patch release.

    👀 Highlights

    Although this is a patch release, there are two features I'd love to draw your attention to.

    1. 🆔 useId now uses a built-in Vue composable for stable ids between server + client! https://github.com/nuxt/nuxt/pull/28285
    2. 🔥 a new experimental.buildCache feature now allows for quicker app rebuilds https://github.com/nuxt/nuxt/pull/28726

    As always, feedback is appreciated 🙏 ❤️

    ✅ 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

    • nuxt: Cache vue app build outputs (#28726)
    • nuxt: Use ServerPlaceholder for ssr client components (#28563)
    • nuxt: Use reducer array + handle modified proto (#28768)

    🩹 Fixes

    • schema: Resolve user-provided serverDir relative to root (#28700)
    • nuxt: Handle mismatching declaration/plugin extensions (#28709)
    • nuxt: Do not accept arbitrary strings for MiddlewareKey (#28676)
    • nuxt: Do not pass listeners to custom NuxtLink (#28738)
    • nuxt: Generate basic jsdoc for module config entry (#27689)
    • nuxt: Augment NuxtOptions as well as config (#28747)
    • nuxt: Improve error logging in import protections (#28753)
    • nuxt: Handle deleted cookies from CookieStore events (#28760)
    • nuxt: Allow updating appConfig with non-iterable objects (#28773)
    • nuxt: Improve isNuxtError type inference (#28814)

    💅 Refactors

    • nuxt: Update to vue v3.5 + native useId (#28285)

    📖 Documentation

    • Fix typo (#28724)
    • Update broken/redirected links (#28739)
    • Capitalize text (#28734)
    • Updated line number for nuxt build-time hooks (#28746)
    • Add missing query returned value from useRoute() (#28743)
    • Persist package manager choice in code blocks (#28514)
    • Fix postcss codeblock typo (#28801)
    • Include --frozen-lockfile when installing dependencies (#28794)

    🏡 Chore

    • Use tinyexec internally (#28684)
    • Use tinyglobby internally (#28686)
    • Trim tag (#28687)
    • Fix ci typo (#28721)
    • Tidying workflows + add sherif workflow (#28793)
    • Ignore eslint warnings about console logging (#28795)

    ✅ Tests

    ❤️ Contributors

    • Gianluca Di Francesco (@gianlucadifrancesco)
    • Daniel Roe (@danielroe)
    • Joaquín Sánchez (@userquin)
    • Heb (@Hebilicious)
    • Eckhardt (Kaizen) Dreyer (@Eckhardt-D)
    • Gustav Odinger (@gustavwilliam)
    • Julien Huang (@huang-julien)
    • Ismail Sabet (@ismailsabet)
    • Max (@onmax)
    • Anthony Fu (@antfu)
    • @beer (@iiio2)
    • riskrole (@riskrole)
    • Thimo Sietsma (@th1m0)
    Open source →
  11. 3.13.022 Aug 2024
    Release notes

    👀 Highlights

    I'm pretty excited about this release - we've ported some features we had planned for Nuxt v4 back to v3, as well as a raft of bug fixes and performance improvements - as usual.

    Here are a few of things I'm most excited about.

    🏘️ Route Groups

    We now support naming directories with parentheses/brackets to organise your routes without affecting the path.

    For example:

    -| pages/
    ---| index.vue
    ---| (marketing)/
    -----| about.vue
    -----| contact.vue
    

    This will produce /, /about and /contact pages in your app. The marketing group is ignored for purposes of your URL structure.

    Read more in the original PR.

    🏝️ Islands and Head Metadata

    It's now possible for server component islands to manipulate the head, such as by adding SEO metadata when rendering.

    Read more in #27987.

    🪝 Custom Prefetch Triggers

    We now support custom prefetch triggers for NuxtLink (#27846).

    For example:

    <template>
      <div>
        <NuxtLink prefetch-on="interaction">
          This will prefetch when hovered or when it gains focus
        </NuxtLink>
        <!-- note that you probably don't want both enabled! -->
        <NuxtLink :prefetch-on="{ visibility: true, interaction: true }">
          This will prefetch when hovered/focus - or when it becomes visible
        </NuxtLink>
      </div>
    </template>
    

    It's also possible to enable/disable these globally for your app and override them per link.

    For example:

    export default defineNuxtConfig({
      experimental: {
        defaults: {
          nuxtLink: {
            prefetch: true,
            prefetchOn: { visibility: false, interaction: true }
          }
        }
      }
    })
    

    🗺️ Better Server Source Maps

    When running with node --enable-source-maps, you may have noticed that the source maps for the Vue files in your server build pointed to the Vite build output (something like .nuxt/dist/server/_nuxt/index-O15BBwZ3.js).

    Now, even after your Nitro build, your server source maps will reference your original source files (#28521).

    Note that one of the easiest ways of improving your build performance is to turn off source maps if you aren't using them, which you can do easily in your nuxt.config:

    export default defineNuxtConfig({
      sourcemap: {
        server: false,
        client: true,
      },
    })
    

    🎁 New Features for Module Authors

    In the run-up to Nuxt v4, we're working on adding some key functionality for module authors, including a new isNuxtMajorVersion utility where required (#27579) and better inferred typing for merged module options using the new defineNuxtModule().with() method (#27520).

    ✨ Improved Dev Warnings

    We no longer warn when using data fetching composables in middleware (#28604) and we warn when user components' names begin with Lazy (#27838).

    🚨 Vue TypeScript Changes

    For a while, in the Vue ecosystem, we've been augmenting @vue/runtime-core to add custom properties and more to vue. However, this inadvertently breaks the types for projects that augment vue - which is now the officially recommended in the docs way to augment these interfaces (for example, ComponentCustomProperties, GlobalComponents and so on).

    This means all libraries must update their code (or it will break the types of libraries that augment vue instead).

    We've updated our types in Nuxt along these lines but you may experience issues with the latest vue-router when used with libraries which haven't yet done so.

    Please create an issue with a reproduction - I'll happily help create a PR to resolve in the upstream library in question. Or you may be able to work around the issue by creating a declarations.d.ts in the root of your project with the following code (credit):

    import type {
      ComponentCustomOptions as _ComponentCustomOptions,
      ComponentCustomProperties as _ComponentCustomProperties,
    } from 'vue';
    
    declare module '@vue/runtime-core' {
      interface ComponentCustomProperties extends _ComponentCustomProperties {}
      interface ComponentCustomOptions extends _ComponentCustomOptions {}
    }
    

    ✅ 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: Await custom routes function in router.options (#27644)
    • kit: Add new isNuxtMajorVersion compatibility util (#27579)
    • kit,schema: Add .with for better module options types (#27520)
    • nuxt: Warn when user components' names begin with Lazy (#27838)
    • nuxt: Allow specifying app id when creating a nuxt app (#28392)
    • nuxt: Custom enable/disable hooks for usePreviewMode (#28371)
    • kit: Add prepend option to addRouteMiddleware (#28496)
    • nuxt: Allow organising pages within route groups (#28276)
    • vite: Preserve vite sourcemaps for nitro build (#28521)
    • nuxt: Allow defining triggers for prefetching links (#27846)
    • nuxt: Namespace __NUXT__ when using multi-app (#27263)
    • nuxt: Allow server islands to manipulate head (#27987)

    🔥 Performance

    • nuxt: Call cookie decode function only for named cookie (#28215)
    • nuxt: Avoid making client-only component setup async (#28334)
    • nuxt: Avoid multiple calls to getCachedData (#28472)

    🩹 Fixes

    • nuxt: Don't warn for definePageMeta in client-only pages (#28246)
    • kit: Include module dist/runtime/ in tsconfig includes (#28237)
    • schema: Support absolute/relative paths for assetsDir (59f0099f4)
    • schema: Do not override user serverDir (#28249)
    • schema: Use new options syntax for vite-plugin-vue (#28307)
    • schema: Export new module return types (c0ad8db93)
    • kit: Add missing type import (1a60b4541)
    • vite,webpack: Handle local postcss plugins (#28481)
    • nuxt: Handle scroll-padding-top: auto in scrollBehavior (#28320)
    • nuxt: Ensure runtimeConfig.public is reactive on client (#28443)
    • nuxt: Update renamed stub composables from nuxt/scripts (#28449)
    • nuxt: Augment @vue/runtime-core and @vue/runtime-dom (#28446)
    • nuxt: Scan jsx pages for page metadata (#28479)
    • nuxt: Handle plugin type extensions more correctly (#28480)
    • vite: Respect baseURL for public assets in dev (#28482)
    • vite: Add transformation result to log for parse errors (#28508)
    • vite: Include module symbols in generated code (#28509)
    • nuxt: Add reason when aborting request in useFetch (#28517)
    • nuxt: Only augment vue, not sub-packages (#28542)
    • nuxt: Avoid stripping js extensions in plugin injections (#28593)
    • nuxt: Preserve route-specific metadata on route.meta (#28441)
    • nuxt: Don't warn when data fetching in middleware (#28604)
    • nuxt: Extract route rules/page meta in 2+ script blocks (#28625)
    • nuxt: Allow customising status code in validate method (#28612)
    • nuxt: Do not provide default prefetchOn prop (#28630)
    • nuxt: Revert back to object syntax for island head (#28656)

    📖 Documentation

    • Fix issue in cookie passing example (#28223)
    • Fix note in layers usage chapter (#28236)
    • Fix spaces (#28233)
    • Add vue lang to sample code (#28247)
    • Use splitSetCookieString from cookie-es (29f95ae0d)
    • Use headers.getSetCookie (45c6df9a4)
    • Fix codemod command typos (#28279)
    • bunx -> bun x (#28277)
    • Add missing comma to example (#28300)
    • Add language to example schema codeblock (#28294)
    • Update link to RuntimeNuxtHooks (#28336)
    • Update links to social media (cd5195047)
    • Setup host property and usage example (#28331)
    • Fix TypeScript errors for examples (#28403)
    • Improve readability of link to mdn (#28327)
    • Use ts for create-error example (#28411)
    • Alias links in jsdoc @see blocks (#28270)
    • Link to vue test utils docs for mountSuspended (#28463)
    • Remove vue-tsc major version constraint (#28484)
    • Recommend '#teleports' target instead of 'body' (#28489)
    • Correct custom routing link (#28497)
    • Improve typing of default exports (#28520)
    • Fix options type in custom useFetch recipe (#28389)
    • Update useRuntimeConfig source path (#28553)
    • Add line-breaks to tips in Module Author Guide (#28587)
    • Update nuxt scripts status (#28629)

    🏡 Chore

    • schema: Fix typo (#28377)
    • nuxt: Use router code reference permalink (#28356)
    • nuxt: Remove unnecessary await (#28407)
    • Upgrade vue in a separate pr (#28414)
    • Update docs typecheck command (49de5f731)
    • Lint (cab9e5c35)
    • Fix some typos in comments (#28501)

    ✅ Tests

    • Disable pageTransition in client-only page (#27839)
    • Ignore SharedComponent in server head (510f3e28f)
    • Update bundle size (3ecb95a7c)

    🤖 CI

    • Add reproduire-sur-stackblitz workflow (#28531)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Julien Huang (@huang-julien)
    • Maxime Pauvert (@maximepvrt)
    • felix-dolderer (@felix-dolderer)
    • Nicolas Payot (@nicolaspayot)
    • Kewin Szlezingier (@kewinzaq1)
    • Vasily Kuzin (@ExEr7um)
    • xjccc (@xjccc)
    • Martin André (@Martichou)
    • Mike Laumann Bellika (@MikeBellika)
    • Typed SIGTERM (@typed-sigterm)
    • Horu (@HigherOrderLogic)
    • Son Tran (@trandaison)
    • rubyisrust (@rubyisrust)
    • Matej Černý (@CernyMatej)
    • Riley Ho (@rileychh)
    • Adam DeHaven (@adamdehaven)
    • Potter (@yxw007)
    • Martin Masevski (@Archetipo95)
    • BoogieBen. (@boogie-ben)
    • Tobias Diez (@tobiasdiez)
    • Michael Brevard (@GalacticHypernova)
    • Damian Głowala (@DamianGlowala)
    • Lucie (@lihbr)
    • Yasser Lahbibi (@yassilah)
    • Sébastien Chopin (@atinux)
    • @beer (@iiio2)
    • AuroraTea (@AuroraTea)
    • Bobbie Goede (@BobbieGoede)
    • Alexander Lichter (@manniL)
    • nuxt-studio[bot] (@nuxt-studio[bot])
    • Vaci (@vacijj)
    • FELIPE COSTA DE OLIVEIRA (@FelipeO16)
    • 一纸忘忧 (@ikxin)
    • Meo (@miaobuao)
    • Mohab Sameh (@mohab-sameh)
    • Quentin Macq (@quentinmcq)
    • Johan Krijt (@johankrijt)
    Open source →
  12. 3.12.418 Jul 2024
    Release notes

    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

    • Daniel Roe (@danielroe)
    • arshcodemod (@arshcodemod)
    • xjccc (@xjccc)
    • Julien Huang (@huang-julien)
    • BoogieBen (@boogie-ben)
    • Santiago A (@santiagoaloi)
    • Bobbie Goede (@BobbieGoede)
    • John Tanzer (@moshetanzer)
    • Thomas (@ThomasWT)
    • @beer (@iiio2)
    • Dominic (@rexhent)
    • Alex Liu (@Mini-ghost)
    • Florian Metz (@Timeraa)
    • Liran Tal (@lirantal)
    • Daniel Kelly (@danielkellyio)
    • Daniel Flanagan (@FlantasticDan)
    • 山吹色御守 (@KazariEX)
    • izzy goldman (@izzygld)
    • Anthony Fu (@antfu)
    Open source →
  13. 3.12.32 Jul 2024
    Release notes

    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

    • Use absolute urls for sources to assets in readme (5ef305cec)
    • Use relative links and update in build script (7dd15186e)
    • Use backup file extension (a42a3869b)
    • Allow changelogs with breaking changes (e11587189)
    • Allow major bumps (dea0b86c7)
    • Add 4x tag for v4 nightly releases (9d5dd5494)
    • vite: Restore utils required for dev-bundler (e3448fa0d)
    • Remove nitro/h3 from renovate, and reenable vitejs/vue (9037b0d2c)
    • Improve type safety with indexed access (#27626)
    • Add @danielroe to code owners (7fa957729)
    • Remove renovate configuration from 2.x branch (8003cf72f)
    • Remove issue template for 2.x (9f9fb9251)
    • Remove unused variable (f07969d88)

    ✅ 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

    • Daniel Roe (@danielroe)
    • Typed SIGTERM (@typed-sigterm)
    • Seno (@s-en-o)
    • Julien Huang (@huang-julien)
    • Michael Brevard (@GalacticHypernova)
    • Ryota Watanabe (@wattanx)
    • Martin Masevski (@Archetipo95)
    • Alex Liu (@Mini-ghost)
    • Bochkarev Ivan (@Ibochkarev)
    • Alexander Lichter (@manniL)
    • Dominic (@rexhent)
    • Aviv Keller (@RedYetiDev)
    • Maxime Pauvert (@maximepvrt)
    • Daniel Kelly (@danielkellyio)
    • Damian Głowala (@DamianGlowala)
    • Idorenyin Udoh (@idorenyinudoh)
    Open source →
  14. 3.12.216 Jun 2024
    Release notes

    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

    • Add extra types for empty array definitions (02945b9fa)
    • Remove stub types file for webpack-virtual-modules (58dd7f3a6)
    • Lint (cb77ddc30)

    ✅ Tests

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

    🤖 CI

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Julien Huang (@huang-julien)
    • Alexandru Ungureanu (@unguul)
    • Josh Dean (@jdbdnz)
    • Yusuf Mansur Özer (@ymansurozer)
    • Matteo Rigoni (@Rigo-m)
    • Leo Osa (@leoosa)
    • Levi (Nguyễn Lương Huy) (@huynl-96)
    • David Nahodyl (@Smef)
    • Michael Brevard (@GalacticHypernova)
    • garthreckers (@garthreckers)
    • Valerii Strilets (@letstri)
    • Okuto Oyama (@yamanoku)
    • Harlan Wilton (@harlan-zw)
    Open source →
  15. 3.12.111 Jun 2024
    Release notes

    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

    • Daniel Roe (@danielroe)
    • Pooya Parsa (@pi0)
    • Alexander Lichter (@manniL)
    Open source →
  16. 3.12.011 Jun 2024
    Release notes

    👀 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

    • Update moduleResolution to Bundler (#26658)
    • Cleanup eslint rules with latest @nuxt/eslint-config (#26653)
    • Fix devcontainer.json syntax (#26776)
    • Ignore SSL certificate error with conventionalcommits.org (9ba1ebe98)
    • Fix small typos (#26907)
    • Add @nuxt/ui-templates to core monorepo (fe6bdcc01)
    • Skip releasing ui-templates (15781c608)
    • Build ui-templates first (1add938a5)
    • ui-templates: Remove legacy artifacts (3d2f93d5a)
    • Update lockfile (447db137a)
    • Dedupe (94a6f0581)
    • ui-templates: Misc improvements (#27033)
    • Disable jiti_cache when running vitest (2786595f5)
    • Upgrade dev dependencies (061fbd4bd)
    • For goodness' sake (3708ee872)
    • Update root monorepo node engine (#27122)
    • Move @internal comment (cf736e274)
    • Remove redundant eslint-plugin-regexp (#27271)
    • Build ui-templates when stubbing packages (#27446)
    • Improve types in tests (#27293)
    • Temporarily disable updates for jiti and @vitejs/plugin-vue (2a2847e4b)
    • Disable shamefully-hoist within repo (#27483)
    • ui-templates: Improve type safety in render (94c84feee)
    • Lint (5d7f7dae4)
    • Upgrade jiti (#27479)

    ✅ 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

    • Daniel Roe (@danielroe)
    • Maik Kowol (@94726)
    • Ryan Clements (@RyanClementsHax)
    • Hendrik Heil (@hendrikheil)
    • Pooya Parsa (@pi0)
    • Damian Głowala (@DamianGlowala)
    • Inesh Bose (@ineshbose)
    • André Luiz da Silva (@andresilva-cc)
    • Luke Nelson (@luc122c)
    • nopeless (@nopeless)
    • Israel Ortuño (@IsraelOrtuno)
    • Jakub Bednár (@jakubednar)
    • praburangki (@praburangki)
    • JD Solanki (@jd-solanki)
    • Julien Huang (@huang-julien)
    • Jakub Szafrański (@samupl)
    • @beer (@iiio2)
    • Anthony Fu (@antfu)
    • Horu (@HigherOrderLogic)
    • Maxime Pauvert (@maximepvrt)
    • Miha Sedej (@tresko)
    • Lasse Diercks (@lassediercks)
    • Sébastien Chopin (@Atinux)
    • Nicolas Payot (@nicolaspayot)
    • yubo (@itchina110)
    • Kim-Lan (@Kim-Lan)
    • Deth (@dethdkn)
    • Martins Zeltins (@martinszeltins)
    • Ryota Watanabe (@wattanx)
    • Alexander Lichter (@manniL)
    • Dominik Opyd (@oritwoen)
    • Michael McAndrew (@michaelmcandrew)
    • gangan (@shinGangan)
    • Alex Liu (@Mini-ghost)
    • ynnsuis (@sossost)
    • AngelHdz Multimedia (@angelhdzmultimedia)
    • David (@dbzx10299)
    • Danila Rodichkin (@daniluk4000)
    • Harlan Wilton (@harlan-zw)
    • Shizuku (@ifshizuku)
    • zer0fire (@zer0fire)
    • Will Willems (@willwillems)
    • Pothuraju (@pothuraju-dev)
    • xjccc (@xjccc)
    • Cedric (@ceddy4395)
    • Fabian B (@madebyfabian)
    • Alexandr (@BubbleSortt)
    • rgehbt (@Gehbt)
    • Adam Hudák (@adam-hudak)
    • Babak Farkhoopak (@babakfp)
    • Trent Fellbootman (@Trent-Fellbootman)
    • John Tanz (@moshetanzer)
    • Alexandros Kazantzidis (@Alexandros23Kazantzidis)
    • Joaquín Sánchez (@userquin)
    • Turdalin Nurassyl (@trdln)
    • Louis Ramos (@wJoenn)
    • Nate (@navanjr)
    • Ivan Kalachikov (@ivan-kalachikov)
    • Edwin Fadul (@edwinfadul)
    • kawadah (@kawadah)
    • Mehdi (@mehdi-coding)
    • Shao (@shao-wang-me)
    • OrbisK (@OrbisK)
    • Taras Batenkov (@enkot)
    • Han (@fenghan34)
    • RollingTL (@RollingTL)
    • Max (@onmax)
    • Neil Mispelaar (@neilmispelaar)
    • Florent Delerue (@Flosciante)
    • Nourman Hajar (@masnormen)
    • Patrick D'Orival (@patrickdorival)
    • Mario Neuhold (@mario-neuhold)
    • AndreyYolkin (@AndreyYolkin)
    • Liam Converse (@liconver)
    Open source →
  17. 3.11.24 Apr 2024
    Release notes

    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

    • Fix typo in test descriptions (#26366)
    • Rename to yaml (00018084d)
    • Improve pr template (#26562)
    • Enable devtools by default in playground (17488508b)
    • Migrate to ESLint flat config (#26583)

    ❤️ Contributors

    • Nikita (@nikitadmitr)
    • Alex Liu (@Mini-ghost)
    • Luke Nelson (@luc122c)
    • Damian Głowala (@DamianGlowala)
    • Julien Huang (@huang-julien)
    • Daniel Roe (@danielroe)
    • Antoine Rey (@antoinerey)
    • Maxime Pauvert (@maximepvrt)
    • Taras Batenkov (@enkot)
    • Lehoczky Zoltán (@Lehoczky)
    • Pothuraju (@pothuraju-dev)
    • xjccc (@xjccc)
    • Junaid Ahmed (@junaidkbr)
    • Michał Zarach (@michalzaq12)
    • Thimo (@ThimoDEV)
    • Anthony Fu (@antfu)
    • Alexander Lichter (@manniL)
    • Serge Doda (@bargel)
    • François Rosato (@frosato-dev)
    Open source →
  18. 3.11.118 Mar 2024
    Release notes

    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

    • Daniel Roe (@danielroe)
    • zunderbolt (@zunderbolt)
    • Serge Doda (@bargel)
    • Volker Rose (@riddla)
    • Turdalin Nurassyl (@trdln)
    • Julien Huang (@huang-julien)
    • Joaquín Sánchez (@userquin)
    • Tanvir Rahman (@Tanvir-rahman)
    • Florian Lefebvre (@florian-lefebvre)
    Open source →
  19. 3.11.017 Mar 2024
    Release notes

    👀 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:

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

    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.

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

    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

    • Daniel Roe (@danielroe)
    • Damian Głowala (@DamianGlowala)
    • Horu (@HigherOrderLogic)
    • Max Schmitt (@mxschmitt)
    • Tanvir Rahman (@Tanvir-rahman)
    • Julien Huang (@huang-julien)
    • Maik Kowol (@94726)
    • Marc Cremer (@marccremer)
    • OrbisK (@OrbisK)
    • Anthony Fu (@antfu)
    • Martins (@martinszeltins)
    • Anthony Aslangul (@toyi)
    • Mehmet (@productdevbook)
    • Mostafa Said (@MooseSaeed)
    • Alex Liu (@Mini-ghost)
    • Adam DeHaven (@adamdehaven)
    • Harlan Wilton (@harlan-zw)
    • Alexander Lichter (@manniL)
    • k-karen (@k-karen)
    • Ryota Watanabe (@wattanx)
    • Antoine Zanardi (@antoinezanardi)
    • Sultanov Mirjamol (@cljamal)
    • Bogdan Kostyuk (@logotip4ik)
    • Divine (@divine)
    • Horváth Bálint (@horvbalint)
    • i-udas (@i-udas)
    • təəna.vuə (@franklin-tina)
    • Andre van Tonder (@drevantonder)
    • Maxime Pauvert (@maximepvrt)
    • Oumar Barry (@oumarbarry)
    • Sébastien Chopin (@Atinux)
    • Francesco Scutellaro (@noppytinto)
    • gangan (@shinGangan)
    • Andrea Basile (@Evobaso-J)
    • Till Sanders (@tillsanders)
    • Michael Brevard (@GalacticHypernova)
    • Victor Ribeiro (@ojvribeiro)
    Open source →
  20. 3.10.322 Feb 2024
    Release notes

    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

    • Daniel Roe (@danielroe)
    • Mateusz Kulpa (@mateuszkulpa)
    • Jonathan Walters (@Chalks)
    • Josh Layton (@jl8n)
    • Julien Huang (@huang-julien)
    • Damian Głowala (@DamianGlowala)
    • Florent Delerue (@Flosciante)
    • Alexander Lichter (@manniL)
    • Anthony Fu (@antfu)
    • OnlyWick (@OnlyWick)
    • Michał Zarach (@michalzaq12)
    • Miha Sedej (@tresko)
    Open source →
  21. 3.10.214 Feb 2024
    Release notes

    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)
    • <script setup> changed to <script setup lang="ts"> (#25750)
    • 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

    • Sam Blowes (@blowsie)
    • Daniel Roe (@danielroe)
    • yoshihirokurosaki (@irishkooky)
    • Eduardo San Martin Morote (@posva)
    • Mahdi Shah Abbasian (@shahabbasian)
    • João Carmona (@jpsc)
    • Naim Ahmed Shuvo (@shuvo-me)
    • Denis L (@DenisLug)
    • GJSSSS (@gjssss)
    • Anthony Fu (@antfu)
    • Aman Desai (@amandesai01)
    • Stephen Strange (@byStrange)
    • Žan Fras (@frasza)
    • Santiago Morales (@Aleroms)
    • Hendrik Heil (@hendrikheil)
    Open source →
  22. 3.10.15 Feb 2024
    Release notes

    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

    • Daniel Roe (@danielroe)
    • Julien Huang (@huang-julien)
    • Harlan Wilton (@harlan-zw)
    • Bobbie Goede (@BobbieGoede)
    • xjccc (@xjccc)
    • Ryan Clements (@RyanClementsHax)
    • Enkot (@enkot)
    • Damian Głowala (@DamianGlowala)
    • Ted de Koning (@tdekoning)
    • Troy Ciesco (@troyciesco)
    • Michael Brevard (@GalacticHypernova)
    • Arslan Ali (@warlock1996)
    Open source →
  23. 3.10.030 Jan 2024
    Release notes

    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.

    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:

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

    <img height="20" width="20" src="https://api.iconify.design/vscode-icons:file-type-node.svg"> Client-side Node.js support

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

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

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

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

    // ~/plugins/node.client.ts
    import { Buffer } from 'node:buffer'
    import process from 'node:process'
    
    globalThis.Buffer = Buffer
    globalThis.process = process
    
    export default defineNuxtPlugin({})
    

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

    🍪 Better cookie reactivity

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

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

    🏥 Detecting anti-patterns

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

    • We now will throw an error if setInterval is used on server (#25259).
    • We warn (in development only) if data fetch composables are used wrongly (#25071), such as outside of a plugin or setup context.
    • We warn (in development only) if you are not using <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

    • Daniel Roe (@danielroe)
    • Якин Никита (@TakNePoidet)
    • Nozomu Ikuta (@NozomuIkuta)
    • Ivan Kalachikov (@ivan-kalachikov)
    • Horváth Bálint (@horvbalint)
    • kevin olson (@acidjazz)
    • Michael Brevard (@GalacticHypernova)
    • Enkot (@enkot)
    • Damian Głowala (@DamianGlowala)
    • Mostafa Said (@MooseSaeed)
    • Julien Huang (@huang-julien)
    • TroyanOlga (@TroyanOlga)
    • Rivaland TAWOUAFO NGUTE (@caporalCode)
    • Becem (@becem-gharbi)
    • Shay (@shayr1)
    • hitochan777 (@hitochan777)
    • Luke Nelson (@luc122c)
    • Alexander Lichter (@manniL)
    • Sébastien Chopin (@Atinux)
    • Hriteek Bista (@hriteek)
    • Pooya Parsa (@pi0)
    • Dominic Marcelino (@Dominic-Marcelino)
    • Luke Warlow (@lukewarlow)
    • Danila Rodichkin (@daniluk4000)
    Open source →
  24. 3.9.317 Jan 2024
    Release notes

    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

    • Danila Rodichkin (@daniluk4000)
    • Anthony Fu (@antfu)
    • Julien Huang (@huang-julien)
    • Mustafa60x (@mustafa60x)
    • Александр Дьяконов (@Holiden)
    • Flowern (@FlorianWerndl)
    • Daniel Roe (@danielroe)
    Open source →
  25. 3.9.216 Jan 2024
    Release notes

    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

    • Daniel Roe (@danielroe)
    • Julien Huang (@huang-julien)
    • Larry Williamson (@L422Y)
    • Chris Visser (@chris-visser)
    • Maxime Pauvert (@maximepvrt)
    • Nils Wiesinger (@warflash)
    • chris-basebone (@chris-basebone)
    • Alexander Lichter (@manniL)
    • Bertil Johannes Ipsen (@bipsen)
    • Matej Černý (@CernyMatej)
    • kongmoumou (@kongmoumou)
    • Yi-Ru Lan (@awdr74100)
    • Kiarttipum Charoenpojvajana (@44kia244)
    • Pooya Parsa (@pi0)
    • Inesh Bose (@ineshbose)
    • Sébastien Chopin (@Atinux)
    • Petar Nikolov (@petarvnikolov)
    • Michael Brevard (@GalacticHypernova)
    • toto6038 (@toto6038)
    • gal-cernilogar (@gal-cernilogar)
    • Shoshana Connack (@moshetanzer)
    Open source →
  26. 3.9.15 Jan 2024
    Release notes

    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

    • Pooya Parsa (@pi0)
    • Julien Huang (@huang-julien)
    • Michael Brevard (@GalacticHypernova)
    • Luke Nelson (@luc122c)
    • Alex Liu (@Mini-ghost)
    • Daniel Roe (@danielroe)
    • Alireza Jahandideh (@Youhan)
    • Mateusz Kulpa (@mateuszkulpa)
    • Bernhard Berger (@bernhardberger)
    • Peter (@tada5hi)
    • Sébastien Chopin (@Atinux)
    • heygsc (@heygsc)
    • Clément Ollivier (@clemcode)
    • Soheil Nazari (@s0h311)
    • Alexander Lichter (@manniL)
    Open source →
  27. 3.9.025 Dec 2023
    Release notes

    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

    • Update variable in release scripts (258b8a706)
    • Import types from '#app' (#24418)
    • Update markdownlintignore (1abb5479c)
    • Update vitest dependencies (#24659)
    • Pin rollup to v4 (#24814)
    • nuxt: Add return type for entry (#24821)
    • Use dev:prepare instead of build:stub (802b3e28c)

    ✅ 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

    • Daniel Roe (@danielroe)
    • Damian Głowala (@DamianGlowala)
    • Isaac Qadri (@pmnzt)
    • Michael Brevard (@GalacticHypernova)
    • Bobbie Goede (@BobbieGoede)
    • Becem (@becem-gharbi)
    • Julien Huang (@huang-julien)
    • Sébastien Chopin (@Atinux)
    • Harlan Wilton (@harlan-zw)
    • Victor Akintunde (@akintoluvic)
    • Nathanaël Labreuil (@IonianPlayboy)
    • Ryota Watanabe (@wattanx)
    • Michael Cole (@MichaelJCole)
    • Kekeocha Justin Chetachukwu (@justinkekeocha)
    • Ewen Quimerc'h (@EwenQuim)
    • Abraham (@anubra266)
    • Luke Nelson (@luc122c)
    • Eugen Guriev (@theguriev)
    • Chris Bailey (@chris-bailey)
    • Alper Doğan (@doganalper)
    • Jamie Trip (@Jamie4224)
    • Alexander Lichter (@manniL)
    • Idorenyin Udoh (@idorenyinudoh)
    • Phojie Rengel (@phojie)
    • GJSSSS (@gjssss)
    • Xxhls (@xxhls)
    • Marco Solazzi (@dwightjack)
    • Lehoczky Zoltán (@Lehoczky)
    • RoiLeo (@RoiLeo)
    • Daniel Acuña (@DaniAcu)
    • Sadegh Barati (@sadeghbarati)
    • Anthony Fu (@antfu)
    • Kostis Maninakis (@maninak)
    • Pooya Parsa (@pi0)
    • MaxMonteil (@MaxMonteil)
    Open source →
  28. 3.8.220 Nov 2023
    Release notes

    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

    • Anthony Fu (@antfu)
    • Sébastien Chopin (@Atinux)
    • Christian Gil (@ChrisGV04)
    • Clément Ollivier (@clemcode)
    • Luke Nelson (@luc122c)
    • Siegerts (@siegerts)
    • Julien Huang (@huang-julien)
    • Joe Hawes (@morehawes)
    • Alexander Lichter (@manniL)
    • Daniel Roe (@danielroe)
    • Damian Głowala (@DamianGlowala)
    • Pooya Parsa (@pi0)
    • Boby Tiwari (@Boby900)
    • Sita (@Pitabread8)
    • Nils Wiesinger (@warflash)
    • Webfansplz (@webfansplz)
    • Aaron_Zhou (@Clarkkkk)
    • 56 (@Nationalcat)
    • Adrien Zaganelli (@adrienZ)
    • Alonge Akintomide (@tomidealonge)
    • Nasser BOUKEHIL (@nasrob)
    • Passionate-bram (@passionate-bram)
    • Maxime Pauvert (@maximepvrt)
    • Dario Ferderber (@darioferderber)
    • Brendan Mulholland (@bmulholland)
    Open source →
  29. 3.8.16 Nov 2023
    Release notes

    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

    • Fabian B (@madebyfabian)
    • Mehdi Lahlou (@medfreeman)
    • Webfansplz (@Webfansplz)
    • Damian Głowala (@DamianGlowala)
    • Andrey Yolkin (@AndreyYolkin)
    • Vasilis Souvatzis (@vasisouv)
    • Daniel Roe (@danielroe)
    • Marco Solazzi (@dwightjack)
    • NiJia Lin (@louis70109)
    • Hugo Torzuoli (@HZooly)
    • Mathieu ALBIN (@jaegar-wolf)
    • Julien Huang (@huang-julien)
    • Jaap Roes (@jaap3)
    • Ryota Watanabe (@wattanx)
    • Sébastien Chopin (@Atinux)
    • Hossein-moghadam (@hosseinmoghaddam)
    • Bastien Rossi (@bastienrossi)
    • Ordago (@ordago)
    • Jeffrey GONZALES (@jgonz3)
    • Anthony Fu (@antfu)
    • Leonard Mihalcea (@LeVoMihalcea)
    • Paulo Pertierra (@paulo-pertierra)
    • Conner (@connerblanton)
    • KeJun (@KeJunMao)
    • Bjorn Lu (@bluwy)
    • Salman Khattak (@khattaksd)
    • Luke Nelson (@luc122c)
    • Jianqi Pan (@Jannchie)
    • Matej Černý (@CernyMatej)
    Open source →
  30. 3.8.019 Oct 2023
    Release notes

    👀 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
      }
    })
    

    🔗 NuxtLink defaults

    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

    • Daniel Roe (@danielroe)
    • Pooya Parsa (@pi0)
    • Anthony Fu (@antfu)
    • Jianqi Pan (@Jannchie)
    • Damian Głowala (@DamianGlowala)
    • Sébastien Chopin (@Atinux)
    • Alexander Lichter (@manniL)
    • @boc-the-git
    • Aleksandar Trpkovski (@Suv4o)
    • Dario Ferderber (@darioferderber)
    • Warflash (@warflash)
    • Julien Huang (@huang-julien)
    • Sacha Stafyniak (@stafyniaksacha)
    • Alex Liu (@Mini-ghost)
    • Orocane (@S1RANN)
    • Italo (@DarkGhostHunter)
    • @maritaria
    • Andrey Yolkin (@Andrey Yolkin)
    • Aaron_Zhou (@Clarkkkk)
    • Estéban (@Barbapapazes)
    • @sheriffderek
    • Eugen Istoc (@genu)
    • Mostafa Said (@i-Said-Code)
    • Ezra Adeyinka (@adeyinkaezra123)
    • Ryota Watanabe (@wattanx)
    • Hendrik Heil (@hendrikheil)
    • @0xflotus
    • Albert Brand (@AlbertBrand)
    • Arsen Goian (@arsengoian)
    • Maxim (@MaxKostenko)
    • Filip Weidemann (@filipweidemann)
    • Toni Engelhardt (@toniengelhardt)
    Open source →
  31. 3.7.426 Sept 2023
    Release notes

    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

    • Add .devcontainer (#22810)
    • Remove previous e2e crawler script (5d36e5c93)

    🤖 CI

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

    ❤️ Contributors

    • Damian Głowala (@DamianGlowala)
    • Tech Genius (@TechGenius7777)
    • Daniel Roe (@danielroe)
    • Percy Ma (@kecrily)
    • Josh Deltener (@hecktarzuli)
    • Arash (@arashsheyda)
    • Abdul Al-Hasany (@abdul-alhasany)
    • Muhammad Mahmoud (@MuhammadM1998)
    • Pooya Parsa (@pi0)
    • Alex Riviere (@fimion)
    • Default-kaas (@default-kaas)
    • Michel EDIGHOFFER (@edimitchel)
    • Arkadiusz Sygulski (@Aareksio)
    • Joaquín Sánchez (@userquin)
    • Josh Jancourtz (@jcolpal)
    • 翠 / Green (@sapphi-red)
    • Jeremy Graziani (@AcelisWeaven)
    • Julien Huang (@huang-julien)
    • Andrey Yolkin (@AndreyYolkin)
    • Petro Silenius (@PetroSilenius)
    • Ryota Watanabe (@wattanx)
    Open source →
  32. 3.7.313 Sept 2023
    Release notes

    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

    • Daniel Roe (@danielroe)
    • Julien Huang (@huang-julien)
    • Daniel Rivers (@DanielRivers)
    • Tech Genius (@TechGenius7777)
    Open source →
  33. 3.7.212 Sept 2023
    Release notes

    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

    • Daniel Roe (@danielroe)
    • ML (@ijkml)
    • Tech Genius (@TechGenius7777)
    • Manthankumar Satani (@itsmnthn)
    • David Gonzalez (@davidglezz)
    • Maxime Pauvert (@maximepvrt)
    • Dmitry Istomin (@tirojal)
    • Maxim (@MaxKostenko)
    • Julien Huang (@huang-julien)
    • Sma11X (@Sma11X)
    • Michel EDIGHOFFER (@edimitchel)
    Open source →
  34. 3.7.15 Sept 2023
    Release notes

    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

    • Julien Huang (@huang-julien)
    • Saman (@bounoable)
    • Harlan Wilton (@harlan-zw)
    • Kekeocha Justin Chetachukwu (@justinkekeocha)
    • Daniel Roe (@danielroe)
    • Xjccc (@xjccc)
    • Joaquín Sánchez (@userquin)
    • Andrey Yolkin (AndreyYolkin)
    • OrlS15 (@OrlS15)
    • Alex Liu (@Mini-ghost)
    • Jonas Thelemann (@dargmuesli)
    • Sébastien Chopin (@Atinux)
    • Ryota Watanabe (@wattanx)
    • Heb (@Hebilicious)
    • Maik Kowol (@94726)
    Open source →
  35. 3.7.025 Aug 2023
    Release notes

    👀 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!

    • <a href="https://github.com/nuxt/cli/discussions/3" target="_blank"><strong>Project Goals</strong></a>
    • <a href="https://github.com/nuxt/cli/discussions/4" target="_blank">Feedbacks and Ideas</a>
    • <a href="https://github.com/nuxt/cli/discussions/7" target="_blank">The journey of Nuxt CLI Generations</a>

    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

    • Pooya Parsa (@pi0)
    • Daniel Roe (@danielroe)
    • Mihailo Bursac (@djixadin)
    • Jongmin Yoon (@jongmin4943)
    • Muhammad Mahmoud (@MuhammadM1998)
    • Colin McDonnell (@colinhacks)
    • Xxxhussein (@xxxhussein)
    • Julien Huang (@huang-julien)
    • Jabin (@@JabinPeng)
    • Eternalltruth (@eternalltruth)
    • JD Solanki (@jd-solanki)
    • Anhao (@ah-dc)
    • Eduardo San Martin Morote (@posva)
    • Harlan Wilton (@harlan-zw)
    • Fares Djefaflia (@frs99)
    • Michael (@nihul87)
    • Ryota Watanabe (@wattanx)
    • Damian Głowala (@DamianGlowala)
    • Sam K (@samk-dev)
    • Adityawarman Dewa Putra (@devdewa)
    • beer (@iiio2)
    • Alexander Lichter (@manniL)
    • Damian Głowala (@DamianGlowala)
    • Heb (@Hebilicious)
    • Curt Grimes (@curtgrimes)
    • Lehoczky Zoltán (@Lehoczky)
    • Jonas Thelemann (@dargmuesli)
    • Lucas Vargas (@vargasmesh)
    • Andrey Yolkin (@AndreyYolkin)
    • Peter Graugaard (@pgraug)
    • Josh Deltener (@hecktarzuli)
    • Estéban (@Barbapapazes)
    • Sébastien Chopin (@Atinux)
    • Nobkd (@nobkd)
    • MiniDigger (@MiniDigger)
    • David Marr (@marr)
    • Adham Farrag (@adhamfarrag)
    • Jean-Pierre Carvalho (@jeanpierrecarvalho)
    • Joaquín Sánchez (@userquin)
    • Anthony Fu (@antfu)
    • Prashant Palikhe (@prashantpalikhe)
    • Ted Xu (@xuzuodong)
    • Aleksandra (@beerose)
    • Dawid Kopys (@DawidKopys)
    • OhB00 (@OhB00)
    • Sisir Ghimire Chettri (@tuxsisir)
    • Maik Kowol (@94726)
    • Rudolf Byker (@rudolfbyker)
    • Bogdan Kostyuk (@logotip4ik)
    Open source →
  36. 3.6.519 Jul 2023
    Release notes

    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

    Open source →
  37. 3.6.419 Jul 2023
    Release notes

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

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

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    nuxi upgrade --force
    

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

    👉 Changelog

    compare changes

    🔥 Performance

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

    🩹 Fixes

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

    📖 Documentation

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

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Nirina Rabeson (@Seboran)
    • Anthony Fu (@antfu)
    • Julien Huang (@huang-julien)
    • Alexander Lichter (@manniL)
    • Mahdi Shah Abbasian (@shahabbasian)
    • Ali Azimi (@ali4zimi)
    • Qin Guan (@qin-guan)
    Open source →
  38. 3.6.314 Jul 2023
    Release notes

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

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    nuxi upgrade --force
    

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

    👉 Changelog

    compare changes

    🔥 Performance

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

    🩹 Fixes

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

    💅 Refactors

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

    📖 Documentation

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

    🏡 Chore

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Samuel Burkhard (@samydoesit)
    • 云游君 (@YunYouJun)
    • Jianqi Pan (@Jannchie)
    • Luke Pinion (@lwpinion)
    • Fanny (@FannyGautierr)
    • Hebilicious (@Hebilicious)
    • Eduardo San Martin Morote (@posva)
    • Eduardo Santos De Brito (@EduSantosBrito)
    • Nurassyl (@Nura-21)
    • Zakir Hossen (@devzakir)
    • Harlan Wilton (@harlan-zw)
    Open source →
  39. 3.6.25 Jul 2023
    Release notes

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

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    nuxi upgrade --force
    

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

    👉 Changelog

    compare changes

    🔥 Performance

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

    🩹 Fixes

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

    📖 Documentation

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

    🏡 Chore

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

    ✅ Tests

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

    ❤️ Contributors

    • Mateusz Kulpa (@mateuszkulpa)
    • Daniel Roe (@danielroe)
    • Nozomu Ikuta (@NozomuIkuta)
    • Julien Huang (@huang-julien)
    • Muhamad Jamil (@Fanreza)
    • Anhao (@ah-dc)
    • Anthony Fu (@antfu)
    • Agénor Debriat (@agenordebriat)
    • ChronicStone (@ChronicStone)
    • Ali Azimi (@ali4zimi)
    • Vasek (@vasek-code)
    • Sébastien Chopin (@atinux)
    • Aditya Rawat (@adityarawat1223)
    • Lucas Vargas (@vargasmesh)
    • David Stack (@davidstackio)
    • Rayan Inerky (@InerkyJad)
    Open source →
  40. 3.6.126 Jun 2023
    Release notes

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

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    nuxi upgrade --force
    

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

    👉 Changelog

    compare changes

    🩹 Fixes

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

    📖 Documentation

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

    ✅ Tests

    ❤️ Contributors

    • Jenjen75 (@jenjen75)
    • Daniel Roe (@danielroe)
    • Anthony Fu (@antfu)
    • Eddie (@Eddie344)
    • Julien Le Coupanec (@LeCoupa)
    • Ryota Watanabe (@wattanx)
    Open source →
  41. 3.6.023 Jun 2023
    Release notes

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

    📣 Upcoming news

    In the coming week you can expect two announcements:

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

    👀 Highlights

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

    <img src="https://nuxt.com/assets/design-kit/logo/icon-green.svg" width="16" height="16" valign="center">  SPA loading indicator

    If your site is served with ssr: false or you have disabled server-rendering on some of your pages, you might be particularly interested in the new built-in SPA loading indicator.

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

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

    ⚡️ Performance improvements

    The first thing that happens when your app is hydrated is that your plugins run, and so we now perform build-time optimisations on your plugins, meaning they do not need to be normalised or reordered at runtime.

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

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

    🔥 Fully static server components

    It has been possible to use server components on static pages, but until now they would increase the payload size of your application. That is no longer true. We now store rendered server components as separate files, which are preloaded before navigation.

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

    🎨 Better style inlining

    If you're monitoring your metrics closely and have not turned off experimental.inlineSSRStyles, you should see more CSS inlined in your page, and a significantly external CSS file. We're now better at deduplicating global CSS, particularly added by libraries like tailwind or unocss.

    🎬 Animation controls

    To give you more fine-grained control over your page/layout components, for example to create custom transitions with GSAP or other libraries, we now allow you to set pageRef on <NuxtPage> and layoutRef on <NuxtLayout. These will get passed through to the underlying DOM elements.

    ✨ Automatic 'static' preset detection

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

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

    💪 Increased type safety

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

    You should now also have type support for runtime Nitro hooks.

    Finally, we have removed more locations where objects had a default any type. This should improve type safety within Nuxt in a number of locations where unspecified types fell back to any:

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

    You can find out more about how to update your code if this affects you in the original PR.

    ⚗️ Nitro 2.5 built-in

    This release ships with new Nitro 2.5, which has a whole list of exciting improvements that are worth checking out.

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

    🛠️ New tools for module authors

    This release brings a number of utilities for modules authors to easily add type templates and assert compatibility with a given version of another module.

    In addition, this release will finally unlock a new nuxt/module-builder mode that should improve type support for module authors. If you're a module author, you might consider following these migration steps to try it out in the coming days.

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    nuxi upgrade --force
    

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

    👉 Changelog

    compare changes

    🚀 Enhancements

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

    🔥 Performance

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

    🩹 Fixes

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

    📖 Documentation

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

    🏡 Chore

    • Add vitest renovate group (7695aca93)
    • Add full version for octokit/request-action (dd5955caf)
    • Widen peer deps in renovate updates (b0ba4b864)
    • Bump bundle size 🤔 (ce4f46385)
    • Ignore webpack-dev-middleware updates on 2.x branch (7f7ae96d1)
    • Ignore vercel/netlify build directories (5d4b71426)

    ✅ Tests

    • Update bundle size (08df73801)
    • Skip instance error test in vite ecosystem CI (f97052cba)

    🤖 CI

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

    ❤️ Contributors

    • Anthony Fu (@antfu)
    • Portnoy Vladislav (@silencerspirit)
    • Roman Vašek (@Droutin)
    • Daniel Roe (@danielroe)
    • Damian Głowala (@DamianGlowala)
    • C-schwan (@c-schwan)
    • Vasily Kuzin (@ExEr7um)
    • Hebilicious (@Hebilicious)
    • Israel Ortuño (@IsraelOrtuno)
    • Sébastien Chopin (@Atinux)
    • Lehoczky Zoltán (@Lehoczky)
    • Julien Huang (@huang-julien)
    • Nozomu Ikuta (@NozomuIkuta)
    • Bruno Braga (@brunobragaw8t)
    • Inesh Bose (@ineshbose)
    • Quentin (@quentint)
    • Wattanx (@wattanx)
    • Zaid Kureshi (@imzedi)
    • Rodrigo Pimentel (@RodrigoProjects)
    • Nicolas Payot (@nicolaspayot)
    • David De Sloovere (@DavidDeSloovere)
    • Miachel Brevard (@GalacticHypernova)
    • Edward Hibbert (@edwh)
    • Žan Fras (@frasza)
    • Jongmin Yoon (@jongmin4943)
    • Léonce Aklin (@leonceaklin)
    • Wilson Pinto (@wilsonpinto)
    • Albaraa Hasan (@Null78)
    • Pooya Parsa (@pi0)
    • Markus (@MSchutt)
    • John Jenkins (@johnjenkins)
    • Asher White (@AWBroch)
    • Harlan Wilton (@harlan-zw)
    • Alexander B (@xanderbarkhatov)
    Open source →
  42. 3.5.36 Jun 2023
    Release notes

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

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    nuxi upgrade --force
    

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

    👉 Changelog

    compare changes

    🔥 Performance

    • nuxt: Avoid watching nested paths (#21256)

    🩹 Fixes

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

    📖 Documentation

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

    🏡 Chore

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

    ✅ Tests

    🤖 CI

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

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Wilson Pinto (@wilsonpinto)
    • Anhao (@ah-dc)
    • Anthony Fu (@antfu)
    • Alexander (@xanderbarkhatov)
    • Lehoczky Zoltán (@Lehoczky)
    • @scscgit
    • Warflash (@warflash)
    • Andrew Luca (@iamandrewluca)
    • Hebilicious (@Hebilicious)
    Open source →
  43. 3.5.229 May 2023
    Release notes

    3.5.2 is a patch release focusing on bug fixes.

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    nuxi upgrade --force
    

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

    👉 Changelog

    compare changes

    🔥 Performance

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

    🩹 Fixes

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

    📖 Documentation

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

    🏡 Chore

    ✅ Tests

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

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Jongmin Yoon (@jongmin4943)
    • Louis Haftmann (@LouisHaftmann)
    • Clément Ollivier (@clemcode)
    • Julien Huang (@huang-julien)
    • Alexander (@xanderbarkhatov)
    • Yue Yang (@g1eny0ung)
    • Lucie (@lihbr)
    • @Gecolay
    • Lehoczky Zoltán (@Lehoczky)
    • Sébastien Chopin (@Atinux)
    • Haruaki OTAKE (@aaharu)
    Open source →
  44. 3.5.121 May 2023
    Release notes

    3.5.1 is a patch release, with bug fixes and performance improvements.

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    nuxi upgrade --force
    

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

    👉 Changelog

    compare changes

    🔥 Performance

    • nuxt: Use granular watcher to avoid crawling ignored dirs (#20836)

    🩹 Fixes

    • webpack: Analyze report path (#20878)
    • nuxt: Allow island renders without / route (#20894)
    • nuxt: Infer useFetch method when generic is passed (#20797)
    • nuxt: Prioritise vue app context when available (#20910)
    • nuxt: Don't refresh when hydrating when data is present (#20916)
    • nuxt: Resolve layer assets in relation to layer directory (#20932)
    • nuxt: Don't match partial component names with prefix (#20939)
    • kit: Resolve relative module paths when installing (#20896)
    • nuxt: Exclude plugin declaration from non-existent files (#20974)
    • nuxt: Use default type for initial value for composables (#20968)
    • nuxt: Skip middleware for islands components (#20924)
    • nuxt: Use resolvePath to handle edge cases for modules (#20975)

    📖 Documentation

    • Fix defaults in custom fetch example (#20898)
    • Fix typo (#20907)
    • Add pnpm test command to run whole test suite (4907660ff)
    • Remove warning around experimental.renderJsonPayloads (891ba880e)
    • Add example of 'alphabetical' plugin numbering (#20930)
    • rendering: Improve rendering modes section (244c68108)
    • rendering: Lint fix (ef8b5b593)
    • Sync useAsyncData and useFetch types (#20935)
    • Update static to isr (#20964)
    • Add advanced usage example of useState (#20249)
    • Add link to layers from pages/ docs (#20976)

    🏡 Chore

    • Rename script test for fixtures:payload (#20908)
    • Pass ref to checkout (58ed8ec34)
    • Remove outdated todo comment (b2a769a86)

    🤖 CI

    ❤️ Contributors

    • Paul Grau (@graup)
    • Luciano Tonet (@lucianotonet)
    • Daniel Roe (@danielroe)
    • Julien Huang (@huang-julien)
    • Haruaki OTAKE (@aaharu)
    • Nate Emerson (@nateemerson)
    • Jongmin Yoon (@jongmin4943)
    • Sébastien Chopin (@Atinux)
    • Aziz Ramdan Kurniawan (@azizramdan)
    • @Gypsophyllite
    • Wilson Pinto (@wilsonpinto)
    • Lemon (@ww-lemon)
    • Vasily Kuzin (@ExEr7um)
    • Anthony Fu (@antfu)
    Open source →
  45. 3.5.016 May 2023
    Release notes

    3.5.0 is a minor (feature) release with lots of new features to play with.

    👀 Highlights

    ⚡️ Vue 3.3 released!

    Vue 3.3 has been released, with lots of exciting features, particularly around type support. This also brings a significant improvement to data fetching when navigating between nested pages (https://github.com/nuxt/nuxt/pull/20777), thanks to @antfu and @baiwusanyu-c.

    • new defineOptions macro
    • 'generic' components
    • typed slots and using external types in defineProps
    • ... and more

    Read the full release announcement for more details.

    🙌 Nitropack v2.4

    We've been working on lots of improvements to Nitro and these have landed already in Nitro v2.4 - you may already have this upgrade, which contains a lot of bug fixes, updates to the module worker format for Cloudflare, Vercel KV support and more.

    One note: if you're deploying to Vercel or Netlify and want to benefit from incremental static regeneration, you should now update your route rules:

    routeRules: {
    --  '/blog/**': { swr: 3000 },
    ++  '/blog/**': { isr: 3000 },
    }
    

    Read the full release notes.

    💖 New defaults

    Rich JSON payload serialisation is now enabled by default (https://github.com/nuxt/nuxt/pull/19205, https://github.com/nuxt/nuxt/pull/20770). This is both faster and allows serialising complex objects in the payload passed from the Nuxt server to client (and also when extracting payload data for prerendered sites).

    This now means that various rich JS types are supported out-of-the-box: regular expressions, dates, Map and Set and BigInt as well as NuxtError - and Vue-specific objects like ref, reactive, shallowRef and shallowReactive.

    You can find an example in our test suite.

    This is all possible due to Rich-Harris/devalue#58. For a long time, Nuxt has been using our own fork of devalue owing to issues serialising Errors and other non-POJO objects, but we now have transitioned back to the original.

    You can even register your own custom types with a new object-syntax Nuxt plugin:

    export default definePayloadPlugin(() => {
      definePayloadReducer('BlinkingText', data => data === '<original-blink>' && '_')
      definePayloadReviver('BlinkingText', () => '<revivified-blink>')
    })
    

    You can read more about how this works here.

    🛝 Interactive server components

    This feature should be considered highly experimental, but thanks to some great work from @huang-julien we now support interactive content within server components via slots (https://github.com/nuxt/nuxt/pull/20284).

    You can follow the server component roadmap at https://github.com/nuxt/nuxt/issues/19772.

    ⏰ Environment config

    You can now configure fully typed, per-environment overrides in your nuxt.config:

    export default defineNuxtConfig({
      $production: {
        routeRules: {
          '/**': { isr: true }
        }
      },
      $development: {
        //
      }
    })
    

    If you're authoring layers, you can also use the $meta key to provide metadata that you or the consumers of your layer might use.

    Read more: https://github.com/nuxt/nuxt/pull/20329.

    💪 Fully typed pages

    You can benefit from fully typed routing within your Nuxt app via this experimental integration with https://github.com/posva/unplugin-vue-router - thanks to some great work from @posva! Out of the box, this will enable typed usage of navigateTo, <NuxtLink>, router.push() and more. You can even get typed params within a page by using const route = useRoute('route-name').

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

    🔎 'Bundler' module resolution

    We now have full support within Nuxt for the bundler strategy of module resolution. We would recommend adopting this if possible. It has type support for subpath exports, for example, but more exactly matches the behaviour of build tools like Vite and Nuxt than Node16 resolution.

    export default defineNuxtConfig({
      typescript: {
        tsConfig: {
          compilerOptions: {
            moduleResolution: 'bundler'
          }
        }
      }
    })
    

    This turns on TypeScript's ability to 'follow' Node subpath exports. For example, if a library has a subpath export like mylib/path that is mapped to mylib/dist/path.mjs then the types for this can be pulled in from mylib/dist/path.d.ts rather than requiring the library author to create mylib/path.d.ts.

    ⚗️ Separate server types

    We plan to improve clarity within your IDE between the 'nitro' and 'vue' part of your app, and we've shipped the first part of this via a separate generated tsconfig.json for your ~/server directory (https://github.com/nuxt/nuxt/pull/20559). You can use by adding an additional ~/server/tsconfig.json with the following content:

    {
      "extends": "../.nuxt/tsconfig.server.json"
    }
    

    Although right now these values won't be respected when type checking, you should get better type hints in your IDE.

    💀 Deprecations

    Although we have not typed or documented the build.extend hook from Nuxt 2, we have been calling it within the webpack builder. We are now explicitly deprecating this and will remove it in a future minor version.

    ✅ 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

    • kit: Add prepend option to addImportsDir (#20307)
    • nuxt: Add scoped helper for clearing error within boundary (#20508)
    • nuxt: Auto import 'watchPostEffect' and 'watchSyncEffect' from vue (#20279)
    • vite: Introduce vite:configResolved hook (#20411)
    • webpack: Introduce webpack:configResolved hook (#20412)
    • kit: Allow vite and webpack plugins to be prepended (#20403)
    • nuxt: Add layer meta and env overrides to config types (#20329)
    • test-utils: Add option to configure test server port (#20443)
    • nuxt: Allow access to components within app (#20604)
    • kit: Support passing getter to addVitePlugin and addWebpackPlugin (#20525)
    • cli: Allow greater control of nuxi analyze from cli (#20387)
    • nuxt: Add nuxtApp.runWithContext (#20608)
    • deps: Upgrade to nitropack v2.4 (#20688)
    • nuxt: Add experimental typedPages option (#20367)
    • nuxt: Add apps to nuxt build-time instance (#20637)
    • cli: Allow passing overrides to other nuxi commands (#20760)
    • schema: Enable rich json payloads by default (#20770)
    • deps: Update vue to v3.3 (#20478)
    • nuxt: Use runWithContext within callWithNuxt (#20775)
    • nuxt: Add useRequestURL helper (#20765)
    • nuxt: Allow fallback production content in <DevOnly> (#20817)
    • kit: addBuildPlugin for builder-agnostic implementation (#20587)
    • nuxt: Allow keeping fallback for NuxtClientFallback (#20336)
    • nuxt: Support separate server tsconfig (#20559)
    • nuxt: Full scoped slots support for server components (#20284)
    • nuxt: Support parallel plugins (#20460)

    🩹 Fixes

    • nuxt: Remove backwards-compatible runtimeConfig proxy (#20340)
    • nuxt: Add @nuxt/devtools module before core modules (#20595)
    • nuxt: Properly handle query for component wrapper (#20591)
    • nuxt: Skip payload extraction for island context (#20590)
    • nuxt: Remove internal <FragmentWrapper> (#20607)
    • nuxt: Ensure useError is called with nuxt app context (#20585)
    • nuxt: Run page meta plugin on all pages (and only pages) (#20628)
    • nuxt, vite: Ignore nuxt_component ssr style and isVue (#20679)
    • webpack: Warn when using deprecated build.extend hook (#20605)
    • nuxt: Allow resolving client nuxt app to singleton (#20639)
    • nuxt: Generate empty sourcemaps for wrappers (#20744)
    • nuxt: Prevent treeshaking hooks with composable names (#20745)
    • kit: Prefer esm resolution for modules to install (#20757)
    • vite: Expand fs.allow dirs to include app files (#20755)
    • nuxt: Deduplicate global components before registration (#20743)
    • nuxt: Remove webstorm compatibility augmentation (0258acdc8)
    • nuxt: Enable suspensible behaviour for nested pages (#20777)
    • cli: Hard-reload nuxt when .env changes (#20501)
    • nuxt: Avoid destructuring error prop (works around upstream bug) (#20795)
    • nuxt: Always inline styles for server/island components (#20599)
    • nuxt: Allow serialising undefined refs (#20828)
    • nuxt: Transform client fallbacks directly on SFCs (#20835)
    • vite: Dedupe/optimize more vue core deps (#20829)
    • nuxt: Get fallback for <DevOnly> from parsed html (#20840)
    • nuxt: Ensure all dir parts are present in component name (#20779)
    • nuxt: Allow pages:extend to enable pages module (#20806)
    • nuxt: Stop loading indicator on vue errors (#20738)
    • nuxt: Add types for webpack/vite environments (#20749)
    • nuxt: Pass from + savedPosition to first scrollBehavior (#20859)

    💅 Refactors

    • schema: Move runtimeCompiler option out of experimental (#20606)
    • kit: Use esm utils for resolvePath (#20756)

    📖 Documentation

    • Fix typo (#20577)
    • Update tailwind configuration guide (#20598)
    • Fix fetch composable examples (#20603)
    • Note that useCookie does not share state (#20665)
    • Selective pre-rendering options (#20670)
    • Ensure we guard all navigateTo examples (#20678)
    • Add useSeoMeta and useServerSeoMeta pages (#20656)
    • Recommend <NuxtLayout> when migrating error.vue (#20690)
    • Add lagon to presets list (#20706)
    • Add await before lazy composable examples (7e7e006e9)
    • Add missing step migrating to pinia (#20778)
    • Server directory improvements (d53cc604d)

    🏡 Chore

    • Revert markdownlint upgrade (da29dea5c)
    • Run docs lint workflow on dep upgrades (c536e5a63)
    • Revert markdownlint-cli update and prevent auto-update (675445f98)
    • Ban @ts-ignore (4f0d3d4ae)
    • Do not install example dependencies (#20689)
    • Disallow .only in tests (ad97cb45a)
    • Type-check .mjs files (#20711)
    • Fix typo in pnpm-workspace.yaml (#20751)
    • Update target for externalVue removal (a33d2e7ae)
    • Lint (742f61766)

    ✅ Tests

    • Test with bundler module resolution (#20629)

    🤖 CI

    • Run autofix on renovate branches (af75f18cf)
    • Run 2.x nightly release on node 16 (a81f9e4c8)
    • Add conditional for node 16 test (aee1218e6)
    • Set max memory for nuxt2 release script globally (d1a5719cb)
    • Add workflow to release branches (bc28d536c)
    • Update pr condition (f8c7b34bd)
    • Update repo 🤣 (f88c1e645)
    • Allow specifying tag for edge releases (5fdb6a6d6)
    • Comment with link to tag of released version (f945cb197)
    • Pass tag as argument (1aec0e503)
    • Release edge versions of labelled prs (cdc42d044)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Sébastien Chopin (@Atinux)
    • Anthony Fu (@antfu)
    • Julien Huang (@huang-julien)
    • Alexander (@xanderbarkhatov)
    • Dario Ferderber (@darioferderber)
    • 白雾三语 (@baiwusanyu-c)
    • Inesh Bose (@ineshbose)
    • Lehoczky Zoltán (@Lehoczky)
    • Emile Caron (@emilecaron)
    • Eckhardt (Kaizen) Dreyer (@Eckhardt-D)
    • Eduardo San Martin Morote
    • Tom Lienard (@QuiiBz)
    • Scscgit (@scscgit)
    • Clément Ollivier (@clemcode)
    • Jamie Warburton (@Jamiewarb)
    • Enkot (@enkot)
    • Phojie Rengel (@phojie)
    • Harlan Wilton (@harlan-zw)
    • Gergő Jedlicska (@gjedlicska)
    • Stefan Milosevic (@smilosevic)
    • Pavel Mokin (@Lyrialtus)
    Open source →
  46. 3.4.328 Apr 2023
    Release notes

    3.4.3 is a patch release with the latest bug fixes. 🐞 It is expected that the next release will be v3.5, in approximately two weeks' time.

    ✅ 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: Don't call timeEnd unless we're debugging (#20424)
    • nuxt: Use key to force server component re-rendering (#19911)
    • nuxt: Add basic typings for <ClientOnly> (f1ded44e8)
    • nuxt: Use event.node.req in cookie utility (#20474)
    • deps: Relax upper node version constraint (#20472)
    • nuxi,schema: Support devServer.https: true (#20498)
    • nuxt: Throw 404 when accessing /__nuxt_error directly (#20497)
    • nuxt: Use callAsync for executing hooks with context (#20510)
    • nuxt: Improved typing support for app config (#20526)
    • nuxt: Call app:error in SSR before rendering error page (#20511)
    • nuxt: Restrict access to single renderer outside of test/rootDir (#20543)
    • nuxt: Throw errors when running legacy asyncData (#20535)
    • nuxt: Transform #components imports into direct component imports (#20547)
    • nuxt: Return RenderResponse for redirects (#20496)

    📖 Documentation

    • Fix typos on docs homepage (#20456)
    • Update links to vue-router docs (#20454)
    • Remove RC reference and add link to vue migration build (#20485)
    • Add cdn proxy section (#20408)
    • Add a next steps link to first page of migration docs (#20512)
    • Add custom fetch composable example (#20115)
    • Adjust wrong link after repo migration (#20536)

    ✅ Tests

    🤖 CI

    • Publish edge release with provenance (ec1503731)
    • Run release script with node 18 (0d10e9734)
    • Try releasing nuxt-edge with provenance (753c4c2a3)
    • Run nuxt2 nightly release on node 14 again (48c034cf0)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Anthony Fu (@antfu)
    • Julien Huang (@huang-julien)
    • Andrew Luca (@iamandrewluca)
    • Adrien Zaganelli (@adrienZ)
    • Michael Gale (he/him) (@miclgael)
    • Clément Ollivier (@clemcode)
    • Paul Melero (@gangsthub)
    • Jonas Thelemann (@dargmuesli)
    • Johannes Przymusinski (@cngJo)
    • Idorenyin Udoh (@idorenyinudoh)
    Open source →
  47. 3.4.220 Apr 2023
    Release notes

    3.4.2 is a patch release with the latest bug fixes and performance improvements

    ✨ What's new?

    Apart from the normal bug fixes, we have a couple things we should call out.

    1. 🔥 We're now on Vite 4.3 (#20405). This was a performance-focused release and hopefully you'll be enjoying the speed improvements! Check out the release announcement for more info.
    2. 👀 It's now possible to experimentally enable @parcel/watcher for the Nuxt dev watcher (#20179). This may improve performance if you're on Windows. You'll probably also want to install watchman in that case.

    ✅ 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: Share lazy component definitions (#20259)
    • Remove unused deps and add implicit deps (#20356)
    • Allow using @parcel/watcher for dev watcher (#20179)

    🩹 Fixes

    • vite: Set different cache dirs for client/server (#20276)
    • nuxt: Generate hi-res sourcemaps (#20280)
    • nuxt: Return type directly if not picking asyncData (#20288)
    • nuxt: Provide more helpful error when instance unavailable (#20289)
    • nuxt: Mark useRequestHeaders keys as optional (#20286)
    • vite: Avoid serving arbitrary file in vite-node middleware (#20345)
    • nuxt: Swap preloads for json/js payloads (#20375)
    • nuxt: Handle pages with no content and log warning (#20373)
    • test-utils: Import jest functions from @jest/globals (#20360)
    • core,kit: Ensure module transpilation paths are dirs (#20396)
    • schema: Rely on installed telemetry types (#19640)
    • cli: Load kit from rootDir when preparing project (#20401)
    • nuxt: Clone app config on server (#20278)

    💅 Refactors

    • nuxt: Rework and use isJS and isVue utilities consistently (#20344)
    • vite: Use native isFileServingAllowed util (#20414)

    📖 Documentation

    • Update links on hooks page (#20296)
    • Add brief information on debugging a nuxt app (#20282)
    • Fix vue-tsc link (#20350)
    • Update lint command for the documentation (#20399)

    🏡 Chore

    • Remove @ts-ignore and fix some issues (#20273)
    • Maintain a 'next release' PR (e6cc4aa02)
    • Set git user (2a596c2b3)
    • Don't list dep updates in auto-changelog (8234bc18d)
    • Update vite to v4.3 (#20405)

    🤖 CI

    • Don't run ci for release branches (f550976f7)
    • Give write access to changelogensets (0518cdbff)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Harlan Wilton (@harlan-zw)
    • Preet Mishra (@preetmishra)
    • Lehoczky Zoltán (@Lehoczky)
    • @BD103
    • Anthony Fu (@antfu)
    Open source →
  48. 3.4.113 Apr 2023
    Release notes

    3.4.1 is a patch release. We've pulled it forward slightly to fix a couple of breaking bugs in 3.4.0.

    👉 Changelog

    compare changes

    🩹 Fixes

    • nuxt: Set config on ssrContext in spa renderer (#20216)
    • nuxt: Mark entire payload as reactive (#20218)
    • nuxt: Add missing imports to <NuxtClientFallback> (#20237)
    • nuxt: Improve handling of redirects within middleware (#20244)
    • nuxt: Do not redirect when vue-router normalises url (#20247)

    📖 Documentation

    • Add a brief description of transform/pick (#20186)

    ✅ Tests

    • Add js payload test suite (#20217)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • David Kurek (@daviddomain)
    Open source →
  49. 3.4.011 Apr 2023
    Release notes

    3.4.0 is a minor (feature) release for Nuxt 3 bringing exciting new features, including support for the View Transitions API, transferring rich JavaScript payloads from server to client - and much more.

    👀 Highlights

    🪄 View Transitions API Support

    https://user-images.githubusercontent.com/904724/231222082-6bd4aeae-3026-407e-b3be-658df6305748.mp4

    <br>

    You can see a demo on https://nuxt-view-transitions.surge.sh

    You may have noticed that Chromium-based browsers now ship a new web platform API: the View Transitions API. This is an exciting new ability for native browser transitions which (among other things) have the ability to transition between unrelated elements on different pages.

    Nuxt now ships with an experimental implementation, which will be under active development during the v3.4 release cycle. See the known issues in the linked PR.

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

    ✨ Payload Enhancements

    We've merged a significant change to how Nuxt handles payloads (under an experimental flag). Payloads are used to send data from the server to the client when doing server-side rendering and avoid double data-fetching during the hydration phase.

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

    With this new option enabled, this now means that various rich JS types are supported out-of-the-box: regular expressions, dates, Map and Set and BigInt as well as NuxtError - and Vue-specific objects like ref, reactive, shallowRef and shallowReactive.

    You can find an example in our test suite.

    This is all possible due to Rich-Harris/devalue#58. For a long time, Nuxt has been using our own fork of devalue owing to issues serialising Errors and other non-POJO objects, but we now have transitioned back to the original.

    You can even register your own custom types with a new object-syntax Nuxt plugin:

    export default definePayloadPlugin(() => {
      definePayloadReducer('BlinkingText', data => data === '<original-blink>' && '_')
      definePayloadReviver('BlinkingText', () => '<revivified-blink>')
    })
    

    You can read more about how this works here.

    Note: this only affects payloads of the Nuxt app, that is, data stored within useState, returned from useAsyncData or manually injected via nuxtApp.payload. It does not affect data fetched from Nitro server routes via $fetch or useFetch although this is one area I am keen to explore further.

    Preliminary testing shows a significant speed-up: 25% faster in total server response time for a very minimal app with a large JSON payload, but I'd urge you to run your own tests and share the results with us.

    As mentioned, we're merging this behind a flag so we can test this broadly and gather feedback on the new approach. The most significant potential change is that the payload is now no longer available on window.__NUXT__ immediately. Instead, we now need to initialise the Nuxt app to parse the payload so any code that accesses __NUXT__ will need to be run in a plugin or later in the Nuxt app lifecycle. Please feel free to raise an issue if you foresee or encounter issues in your projects.

    🎁 Object-syntax Nuxt plugins

    We now support object-syntax Nuxt plugins for better control over plugin order and easier registration of hooks.

    export default defineNuxtPlugin({
      name: 'my-plugin',
      enforce: 'pre', // or 'post'
      async setup (nuxtApp) {
        // this is the equivalent of a normal functional plugin
      },
      hooks: {
        // You can directly register Nuxt app hooks here
        'app:created'() {
          const nuxtApp = useNuxtApp()
          // 
        }
      }
    })
    

    In future we plan to enable build optimizations based on the metadata you pass in your Nuxt plugins.

    🛠️ Easier Devtools Configuration

    It's even easier to enable Nuxt DevTools in your project: just set devtools: true in your nuxt.config file to enable devtools.

    export default defineNuxtConfig({
      devtools: true
    })
    

    If it's not already installed, Nuxt will prompt to install it locally. This means you no longer need to have Nuxt DevTools enabled globally.

    Note: the DevTools is still experimental and under active development, so do be prepared for occasional unexpected behaviour, and please report issues directly to https://github.com/nuxt/devtools 🙏

    📚 Layers Improvements

    We now support transforming ~/~~/@/@@ aliases within layers, meaning you now no longer need to use relative paths when importing within layers.

    This should mean it is much easier to use a 'normal' Nuxt project as a layer without needing to specially write it as one.

    🧸 Better Context Transforms

    We now transform certain keys of definePageMeta and defineNuxtComponent which means you should have fewer issues with a missing Nuxt instance. This includes support accessing the Nuxt instance after an await within asyncData and setup functions for those still using the Options API. And you no longer need to wrap middleware and validate with defineNuxtRouteMiddleware when using async functions.

    ♻️ Ecosystem Updates

    As usual, this release will pull in upstream improvements, including the new Consola v3 and Nitropack v2.3.3 (a new minor is expected shortly).

    🚨 'Breaking fixes'

    We've also taken the opportunity to do some cleanup in this minor release.

    1. Previously it was possible to pass the x-nuxt-no-ssr header (undocumented) to force SPA rendering. We've now disabled this behaviour by default but you can get it back by setting experimental.respectNoSSRHeader to true. Alternatively, you can set event.context.nuxt.noSSR on the server to force SPA rendering.
    2. We've removed the (deprecated) #head alias and also disabled the polyfill for @vueuse/head behaviour by default. (It can still be enabled with experimental.polyfillVueUseHead.)
    3. We've removed the (deprecated) experimental.viteNode option. It can be configured instead with vite.devBundler.
    4. We've deprecated accessing public runtime config without the public key. This was an undocument compatibility measure with Nuxt 2 and we plan to remove it entirely in v3.5.
    5. To fix a bug with our vue-router integration, we now generate a slightly different path matching syntax. If you were relying on the exact path generated, have a look at https://github.com/nuxt/nuxt/pull/19902 for more information.

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

    With Nuxt v3.4.0, we now advise that you explicitly install the @types/node version that matches your Node version.

    👉 Changelog

    compare changes

    🚀 Enhancements

    • nuxt: Warn in dev when useRoute is used in middleware (#20050)
    • nuxt: Support disabling watch with useFetch (#19823)
    • nuxt: Support ~/~~/@/@@ aliases within layers (#19986)
    • nuxt: Respect custom dir.pages in page placeholder (#20079)
    • nuxt: Support vue runtime compiler (#4762)
    • test-utils: Allow mounting single component for testing (#5723)
    • nuxt: Experimental option for rich json payloads (#19205)
    • nuxt: Prompt to install devtools when it's enabled (#20126)
    • Upgrade to consola v3.x prerelease (#20141)
    • nuxt: Add experimental View Transitions API support (#20092)
    • nuxt: Support async transform of object properties (#20182)
    • nuxt: Support object-syntax plugins (#20003)
    • nuxt: Add experimentalNoScripts route rule (#19805)
    • nuxt: Add chokidar watcher debug timing (#20176)

    🔥 Performance

    • head: Disable @vueuse/head polyfill by default (#20131)

    🩹 Fixes

    • nuxt: End route param tokens manually (#19902)
    • nuxt: Disable x-nuxt-no-ssr header by default (#20024)
    • kit: Support calling Nuxt 2 modules with module container (#20023)
    • nuxt: Add types for globally injected $config object (#20081)
    • nuxt: Throw error on protocol relative path in useFetch (#20052)
    • nuxt: Add @types/node as a peerDependency (#20025)
    • nuxt: Test all custom app config keys for any (#20105)
    • nuxt: Add key to .client component placeholders (#20093)
    • nuxt: Add undefined type for useCookie return value (4f0b3c722)
    • nuxt: Deprecate old (pre-rc) runtimeConfig (#20082)
    • cli: Preview nitro build with custom dir config (#18882)
    • nuxt: Default nitro autoImports to imports.autoImport (#20180)
    • nuxi, vite: Suppress sourcemap + native fetch warnings (#20198)
    • schema: Allow ignorePrefix to be changed (#20202)

    💅 Refactors

    • schema: Clean up experimental options (#20112)
    • nuxt: Remove #head alias (#20111)

    📖 Documentation

    • Add interop default to dynamic vue import example (8908aa7c5)
    • Add short note about custom imports configuration (#20073)
    • Re-enable docs linting and update docs (#20084)
    • Fix type of headers option for useFetch (#20148)
    • Fix typo in @pinia/nuxt module name (#20199)
    • Add import to server-side cookies example (#20197)

    🏡 Chore

    ✅ Tests

    🎨 Styles

    🤖 CI

    • Enable autofix for pr linting (#20085)
    • Use autofix to update bundle size (#20088)
    • Stub project before linting (13b853622)
    • Lint before stubbing (857e9cb3d)
    • Stub project before linting (b329ed781)
    • Use head_ref for dependency deduping (ae5df72c5)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Sacha Stafyniak (@stafyniaksacha)
    • Julien Huang (@huang-julien)
    • Harlan Wilton (@harlan-zw)
    • Nolan (@ncphillips)
    • Jeremy Graziani (@AcelisWeaven)
    • JT Smith (@rizen)
    • Anthony Fu (@antfu)
    • Xjccc (@xjccc)
    • Pooya Parsa (@pi0)
    • Cany748 (@cany748)
    • Aleksandar Trpkovski (@Suv4o)
    • Paul Melero (@gangsthub)
    Open source →
  50. 3.3.32 Apr 2023
    Release notes

    3.3.3 is your regularly scheduled bugfix/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

    🩹 Fixes

    • schema: Prefer src to rootDir aliases (#19937)
    • nuxt: Don't override options signature with schema (#19934)
    • vite: Allow extending vue config per-environment (#19968)
    • nuxt: Store payloads in cache without trailing slash (#19992)
    • webpack: Transpile rest of nuxt runtime directories (#19936)
    • nuxt: Suppress handled errors (#20002)
    • vite: Remove separate rollup dependency (#20013)
    • nuxt: Sync setResponseStatus signature with h3 (#19987)
    • schema: Add export condition for nuxt2 support (1fd491f1a)

    💅 Refactors

    • vite: Use rollup types re-exported from vite (#20011)

    📖 Documentation

    • Fix pages:extend example (72724076b)
    • Remove unused function call (#20021)
    • Add explanation for middleware execution order (#20029)
    • Fix a couple of typos (b083493ec)

    🏡 Chore

    • Remove unneeded types packages (e60cb2698)
    • Use pnpm workspace protocol internally (#19962)
    • Bump version of mkdist to 1.2.0 (a96451d2d)
    • Fix fixture package.json files (8c2ca23c5)
    • Fix typo in code comment (2f8e991b9)

    ✅ Tests

    • Skip bundle size test in ecosystem-ci suites (434e2013e)
    • Bump bundle size test by 100 bytes (5785908ec)

    🤖 CI

    • Run docs linting step on node 18 (1ae5b2c58)

    ❤️ Contributors

    • Daniel Roe (@danielroe)
    • Ben Hong (@bencodezen)
    • Julien Le Coupanec (@LeCoupa)
    • David Mignot (@idflood)
    Open source →
  51. 3.3.224 Mar 2023
    Release notes

    3.3.2 is a patch release with plenty of bug fixes.

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    nuxi upgrade --force
    

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

    👉 Changelog

    compare changes

    🔥 Performance

    • nuxt: Experimentally disable vue server renderer nitro endpoint (#19825)

    🩹 Fixes

    • kit: Provide name to performance.mark() (#19687)
    • nuxt: Unpause DOM updates on suspense resolve (#19740)
    • kit: Handle node 14 performance behaviour (#19733)
    • webpack: Transpile app directory (#19773)
    • nuxt: Unset context after app is created (#19753)
    • cli: Watch dist and register restart hook after nuxt is ready (#19736)
    • nuxt: Ignore falsy modules (#19684)
    • nuxt: Use h3 utilities to set response status/code (#19713)
    • nuxt: Add temporary augmentation for webstorm (and docs) (#19400)
    • nuxt: Handle external navigation to api routes (#19829)
    • nuxt: Observe slot element in custom nuxt-link (#19802)
    • nuxt: Directly render server components (#19605)
    • vite: Support multiple rollup entries (#19842)
    • nuxt: Ignore schema types that eval to any (#19835)
    • nuxt: Use prerender cache for islands (#19822)
    • nuxt: Add missing import in islands template (#19870)
    • kit: Check if nuxt is restarting before updating templates (#19830)
    • test-utils: Allow overriding nitro options (#19872)
    • kit: Add legacy entrypoints for pre v3.3 usage (#19874)

    📖 Documentation

    • Fix auto-imports example (#19520, #19690)
    • Update seo and meta page (#19697)
    • introduction: First batch of improvements (98b9afa6d)
    • Update module author guide (#18551)
    • Add 'going further' section for custom routing (#19565)
    • Improve installation prerequisites (c570ae272)
    • Update custom routing link (8d644903b)
    • Add backticks (#19721)
    • Add link to layout transitions (#19770)
    • Fix typo (#19775)
    • Fix typo (#19779)
    • Fix typo (#19785)
    • Add missing comma (#19791)
    • Update legacy server examples (#19797)
    • Third-party state management and migration guide (#19798)
    • Link to module request issue template (#19754)
    • Improve swr documentation (#18743)
    • Add another example for useAsyncData (#19225)
    • Avoid $fetch in top-level <script setup> (#19357)
    • Removing deprecated coming soon banner (#19817)
    • Add serialization section to data fetching (#19336)
    • Add protocol to superjson link (cebfcb3da)
    • Update play on X links (8c11498a5)
    • Add missing return statement (fc7867fb0)
    • Replace @nuxt/kit example with node built-ins (#19873)
    • Add layers video by LearnVue (d3d09d5d3)
    • Improve components page (340725bb0)

    🏡 Chore

    ✅ Tests

    • Remove sourcemaps from minimal test (#19730)
    • Bump bundle size (e57c797f2)
    • Alias test-utils back to src again (8b06b06a0)

    🤖 CI

    • Test built packages (#19767)

    ❤️ Contributors

    Open source →
  52. 3.3.114 Mar 2023
    Release notes

    3.3.0 is a minor (feature) release with lots of new features to play with. 3.3.1 was a swiftly following release to patch an issue with nuxi on Windows.

    👀 Highlights

    ✨ Local module development DX

    We've landed a raft of changes to enable local modules and improve DX. We now auto-scan your ~/modules folder and register top level files there as modules in your project (https://github.com/nuxt/nuxt/pull/19394). When these files are changed, we'll automatically restart the nuxt server.

      export default defineNuxtConfig({
        modules: [
          '@nuxtjs/tailwindcss',
    -     '~/modules/purge-comments'
        ]
      })
    

    We also now expose nuxt/kit for easy access to kit composables in your local project without having to install @nuxt/kit (https://github.com/nuxt/nuxt/pull/19422).

    ♻️ Restarting Nuxt

    You can add files to the watch array to automatically restart the server (https://github.com/nuxt/nuxt/pull/19530). This is likely to be particularly useful for module authors. You can also trigger a restart of the Nuxt server with the new restart hook (https://github.com/nuxt/nuxt/pull/19084). We also landed a couple of fixes on restarting the Nuxt server which should improve your experience when developing.

    🔥 Performance improvements

    We've increased static asset maxAge to 1yr as a matter of best practice (https://github.com/nuxt/nuxt/pull/19335), and support tree-shaking more of your build (https://github.com/nuxt/nuxt/pull/19508). We also now support preloading <NuxtLink>s with a route in object-syntax (https://github.com/nuxt/nuxt/pull/19120).

    We also track how long it takes each module you use to perform its setup, and warn if it takes too long. You can see all these values by running your dev server with DEBUG=1

    You can also opt-in to some of Nuxt's internal optimisations by configuring composables to be treeshaken in a particular environment (https://github.com/nuxt/nuxt/pull/19383), or to have magic keys automatically injected (https://github.com/nuxt/nuxt/pull/19490) - primarily useful for module authors.

    🐛 Error handling

    We now handle chunk errors by default (https://github.com/nuxt/nuxt/pull/19086), meaning if your site updates with a redeploy, we automatically handle reloading it on navigation. You can disable this and handle it yourself with the new reloadNuxtApp composable. You can also set experimental.restoreState to preserve some of your app state across reloads.

    We also have a new experimental error handling component: <NuxtClientFallback> (https://github.com/nuxt/framework/pull/8216) which can capture errors rendering on server, replace them with fallback content, and granularly trigger rerendering the part with an error on the client. This can be enabled with experimental.clientFallback - feedback very welcome!

    ⚡️ Head improvements

    We've migrated to use unhead directly (https://github.com/nuxt/nuxt/pull/19519) - and automatically tree-shake server-only head composables like useServerHead from your client build (https://github.com/nuxt/nuxt/pull/19576), meaning you can have great SEO without needing to include meta tag logic that's relevant only for crawlers in your client build.

    There's also a new useHeadSafe composable that handles santising untrusted user input (https://github.com/nuxt/nuxt/pull/19548).

    🪵 Better logging in browser DevTools

    Working with the Chrome DevTools team, we've landed a couple of features across the unjs + Nuxt ecosystem meaning we now have first-class support for hiding Nuxt internal stack traces from logs in your (Chromium-based, for now) browser (https://github.com/nuxt/nuxt/pull/19243). We also landed a couple of improvements with stacktraces involving Nuxt hooks (https://github.com/unjs/hookable/pull/69 and https://github.com/unjs/hookable/pull/68) implementing console.createTask.

    Before After

    💪 Type improvements

    Types for server API routes are now more correct - with non-serialisable types stripped out of the return type (https://github.com/unjs/nitro/pull/1002).

    We also now type more of NuxtApp and correctly type unknown injections for greater type-safety (https://github.com/nuxt/nuxt/pull/19643).

    And if you were struggling with correct types when using transform + default with Nuxt data fetching composables, fear no more - we now infer the types correctly (https://github.com/nuxt/nuxt/pull/19487).

    ⚗️ Nitro enhancements

    This release comes with Nitro v2.3, which brings lots of improvements of its own. Check out the release for more info.

    We now support useAppConfig in nitro server routes (https://github.com/nuxt/nuxt/pull/19489) - a long-awaited change. Now useAppConfig is consistently available throughout your app for non-runtime configuration from layers, modules, etc.

    We've also added a nitro:build:public-assets hook to allow modifying assets output from nitro's prerender/build phase (https://github.com/nuxt/nuxt/pull/19638).

    🛠️ Build changes

    As part of moving towards first-class support for PNP and pnpm support without --shamefully-hoist, we've dropped support for some internal (deprecated) utilities using CJS resolve patterns (https://github.com/nuxt/nuxt/pull/19537, https://github.com/nuxt/nuxt/pull/19608). We also now resolve dependencies like nuxt, @nuxt/kit and more using ESM search-paths. We'll be keeping a close eye on this.

    We're also preparing the groundwork for support of new TypeScript Node16 module resolution (https://github.com/nuxt/nuxt/issues/19606), and as part of this have changed the format of our runtime output (using .js instead of .mjs extensions, providing types fields for subpath exports, and more).

    🗺️ Custom config schema (advanced)

    We've been testing out an experimental feature to allow modules and users to extend the Nuxt config schema (https://github.com/nuxt/nuxt/issues/15592), and we've now enabled this by default (https://github.com/nuxt/nuxt/pull/19172). We expect this will be particularly useful for module and layer/theme authors, and should result in some nicer DX for their users.

    Changelog

    compare changes

    🚀 Enhancements

    • nuxi: Enforce consistent casing in filenames (#19088)
    • nuxi: Reload nuxt when restart hook is called (#19084)
    • nuxt: Scan composables with star export (#19249)
    • nuxt: Add versions to runtime nuxtApp (#19064)
    • vite: Add node_modules and buildDir to x_google_ignoreList (#19243)
    • nuxi: Cli wrapper for self restart (#18641)
    • schema: Allow adding page routes without a matching file (#19173)
    • nuxt: Add support for nuxt/kit subpath for local use (#19422)
    • nuxt: Auto-register modules in ~/modules (#19394)
    • nuxt: Enable config schema by default (#19172)
    • kit,nuxt: Add component priority to allow overriding (#19252)
    • nuxt: Enable preloading object-syntax routes (#19120)
    • nuxt: Support trailingSlashBehavior in defineNuxtLink (#19458)
    • nuxt: Allow configuring treeshakeable composables (#19383)
    • nuxi,schema: Add support for setting nuxt logLevel (#19369)
    • nuxt: Support custom keyed composables (#19490)
    • nuxi: Programmatically pass nuxt config overrides (to dev) (#19371)
    • vite: Use custom logger to show vite logs (#19523)
    • nuxt: Enable chunk error handling by default (#19086)
    • nuxt: Add <NuxtClientFallback> component (#8216)
    • nuxt: Add watch option and refactor dev server restarting (#19530)
    • nuxt: Add useHeadSafe and remove layer around head imports (#19548)
    • kit, schema: Measure module setup timings (#18648)
    • nuxt: Support app config for server routes (#19489)
    • nuxt: Add nitro:build:public-assets hook (#19638)

    🔥 Performance

    • nuxt: Increase static asset maxAge to 1yr (#19335)
    • vite: Mark more core functions as side-effect free (#19508)
    • nuxt: Drop @vueuse/head dependency (#19519)
    • nuxt: Tree-shake server composables + prefer server head (#19576)

    🩹 Fixes

    • nuxt: Clear loading indicator on unmount (#19340)
    • nuxt: Deprecate scanning directory index plugins (#18418)
    • nuxt: Prevent fallthrough attributes on custom NuxtLink (#19379)
    • schema: Update vite import.meta types (#19338)
    • vite: Omit / from sourcemapIgnoreList for windows support (73ade185b)
    • nuxt: Pass transform options to component loader plugin (#19414)
    • nuxi: Avoid top-level await in wrapper (44068420d)
    • nuxt: Add kit.* files to published package (#19430)
    • nuxt: Don't print layout warning if page is not ssr (#19434)
    • kit: Match commit hashes of other lengths (#19450)
    • nuxi: Handle different kind of shutdown signals (#19485)
    • nuxt: Exclude nitro output dir from type checking (#19532)
    • vite: Allow disabling clear screen behaviour (#19531)
    • nuxt: Only log boot errors on client-side (#19553)
    • nuxt: Dedupe payload cache by payload url (#19563)
    • nuxt: Provide node16-style type exports (#18431)
    • nuxt: Avoid injecting adhoc modules in schema (#19607)
    • nuxt: Improve types for data fetching with transform (#19487)
    • nuxi: Resolve kit from nuxt modules dir (#19601)
    • nuxt,schema: Merge custom and resolved app configs (#19602)
    • nuxt: Resolve builder using esm syntax (#19608)
    • nuxt: Exclude boolean from inline module definitions (#19621)
    • schema: Show payloadExtraction warning only when unset (#18516)
    • nuxt: Mark non-augmented NuxtApp properties as unknown (#19643)
    • nuxt: Fix default injection type for plugins (#19669)

    💅 Refactors

    • nuxi: Hard restart with communication channel (#19423)
    • kit,nuxi: Resolve module paths using node algorithm (#19537)
    • nuxt: Let mlly handle search paths (#19635)

    📖 Documentation

    • Use consistent indentation in examples (#19342)
    • Update esm link (c35104c76)
    • Add frontmatter note for docs readme to remove from live preview (008426cd3)
    • Add edge banners on versions and modules (#19448)
    • Add local modules ordering (5977adb4d)
    • Fix link to nitro routeRules (#19455)
    • Fix dead link to useSeoMeta guide (#19463)
    • Update devServer.https example (#19486)
    • Add info ~/server/utils directory in ~/utils page (#19500)
    • Update addComponent jsdoc comment (#19503)
    • Update cli docs for --log-level (06b9233b1)
    • Update pr template to include jsdoc annotations (#19511)
    • Add new release cycle info (#19509)
    • Fix local modules (c4222b1f6)
    • Update nitro plugins url (#19547)
    • Ui components - pinceau migration (#19533)
    • Update $fetch documentation (#19356)
    • Move prerequisites into a summary (e0cb950f0)
    • Remove note since already in code block for pnpm (d67a873c4)
    • Add nuxt 2 to nuxt 3 workshop (2905282de)
    • Update various nitro links (#19562)
    • Use consistent page name in example (#19583)
    • Add missing backquotes (#19590)
    • Remove reference to beta/rc/coming soon (4ad5c959e)
    • Warn about modules with side-effects (#19592)
    • Mention config file name before code block (#19634)

    🏡 Chore

    • Bump edge version based on commits (#19397)
    • Add branch to edge release script (171288586)
    • Add chore to type of change in pr template (#19420)
    • Mark @nuxt/test-utils package as external group (#19419)
    • Restrict commit hash strings to 8 chars (abcd27ae0)
    • deps: ⚠️ Update dependency fork-ts-checker-webpack-plugin to v8 (main) (#19468)
    • Force minor bumps at most (0b82f6751)
    • nuxt: Update to new hasProtocol options format (#19555)
    • Improve internal type safety (#19599)
    • Refresh lockfile (#19653)
    • Constrain nitro to minor version (88a5f38de)
    • Bump package versions (615750614)

    ✅ Tests

    • Close pages after use (#19558)

    🤖 CI

    ⚠️ Breaking Changes

    • deps: ⚠️ Update dependency fork-ts-checker-webpack-plugin to v8 (main) (#19468)

    ❤️ Contributors

    Open source →
  53. 3.3.014 Mar 2023

    Nothing published for this version

  54. 3.2.328 Feb 2023
    Release notes

    3.2.3 is a patch release with bug fixes and performance improvements.

    👉 Changelog

    compare changes

    🔥 Performance

    • nuxt: Don't update manifest in dev mode (#19315)

    🩹 Fixes

    • cli: Restart nuxt when distDir is unlinked (#19131)
    • vite: Normalize path emitted by vite watcher (#19179)
    • nuxt: Prefetch object-syntax routes with <NuxtLink> (#19144)
    • webpack: Use default export from webpack (#19166)
    • nuxt: Preserve (re)named imports in meta (#19192)
    • nuxt: Log errors thrown when booting the nuxt app (#19187)
    • nuxt: Preserve explicit rel attribute on internal link (#19309)
    • nuxt: Compatible route object for custom external routes (#19261)
    • vite: Handle non-iterable noExternal option (#19256)

    📖 Documentation

    • Fix components path (#19163)
    • pages: Add example of limiting scanned routes (#19181)
    • Update link (#19197)
    • Clarify that app config is not available (yet) in nitro (#19200)
    • Improved going further modules documentation (#19219)
    • Add docs badge (3c006b33c)

    🏡 Chore

    🤖 CI

    ❤️ Contributors

    Open source →
  55. 3.2.217 Feb 2023
    Release notes

    3.2.1 is a patch release with (lots of) bug fixes and performance improvements since last week's minor release. 3.2.2 was a swiftly following release to patch an issue with nuxi init

    👀 Highlights

    As a patch release, there are mostly bug fixes and performance improvements in the changelog. (Nevertheless, it's always worth reading through!) But one point of note is an experimental reload strategy when chunk errors are encountered. We're hoping to finalise the API and land it in v3.3 (our next feature release) with https://github.com/nuxt/nuxt/pull/19086, but you can test out an experimental version with the following config:

    export default defineNuxtConfig({
      experimental: {
        emitRouteChunkError: 'reload'
      }
    })
    

    With this strategy, your app will hard reload on route changes if there's a chunk error. More info at https://github.com/nuxt/nuxt/pull/19038.

    👉 Changelog

    compare changes

    🚀 Enhancements

    • nuxt: Add experimental app:chunkError hook and reload strategy (#19038)

    🔥 Performance

    • nuxt: Allow tree-shaking empty meta from build (#19032)
    • nuxt: Animate transform rather than width (#19073)
    • nuxt: Don't include side-effects from #components (#19008)

    🩹 Fixes

    • schema: Allow type inference of arrays in runtime config (#18931)
    • nuxt: Avoid recursive import in nitro renderer (#18948)
    • nuxt: Expose nuxt/schema subpath for augmentation (#18922)
    • nitro: Ensure ssr error statusCode is a number (#19001)
    • nuxt: Prevent hyphens forming child routes & warn if dupes are detected (#18944)
    • schema: Transpile nuxt/app by default (#19009)
    • vite: Exclude nuxt/app from optimised deps (9e789c76c)
    • vite: Respect isCustomElement config for jsx transform (#19053)
    • nuxt: Use parser to treeshake client-only declarations (#18951)
    • cli: Pass through exit code from test errors (#18959)
    • nuxt: Show client error if no page matches after validate fails (#18978)
    • cli: Read devServer options from nuxt config (#19055)
    • nuxt: Validate no // in path when constructing payload url (#19085)
    • nuxt: Restore previous check on payload url (e9ff34ace)
    • nuxt: Test generated pathname (af55b9882)
    • nuxt: Respect redirects which differ only by trailing slash (#18593)
    • nuxt: Pass nuxt + workspace paths when importing builder (#19099)

    💅 Refactors

    • nuxt: Combine imports from same relative path (ee2f568fc)

    📖 Documentation

    • Add info for nuxi devtools command (#18888)
    • Update link to bridge repo (#18950)
    • Fix typos (#18976)
    • Fix typo (#18975)
    • Fix link to ESM page (#19000)
    • Fix spacing (#19018)
    • Flatten top-level project in layers example (#18967)
    • Remove reference to obsolete static property (80f73d39c)
    • Add note about nested directory order (#19061)
    • Updated public directory explanation (#18464)
    • Add information on when mw runs & how to skip (#19083)
    • Add sendRedirect usage (#19070)

    📦 Build

    🏡 Chore

    • Increase node 14 minor version constraint (#19111)
    • Update nitropack and unjs dependencies (#19100)
    • Dedupe rollup (576ce9ee3)

    ✅ Tests

    • Skip vnode warning on windows dev mode (71bcd9550)

    🤖 CI

    • Run webpack/vite and dev/prod as matrices (#18905)

    ❤️ Contributors

    Open source →
  56. 3.2.117 Feb 2023

    Nothing published for this version

  57. 3.2.09 Feb 2023
    Release notes

    3.2.0 is the first minor release since we've started our new release schedule. We've brought it forward by a couple of weeks to include some goodies we want you to be able to play with soon.

    👀 Highlights

    • ⚡️ Nuxt DevTools

      You can opt-in to Nuxt DevTools per-project by going to the project root and running:

      npx nuxi@latest devtools enable
      

      Restart your Nuxt server and open your app in browser. Click the Nuxt icon on the bottom (or press Alt+D) to toggle the DevTools.

      More information in the docs!

    • Better DX for overriding runtimeConfig, including inline type helpers <br><br><img src="https://user-images.githubusercontent.com/28706372/215903089-9f071c5f-50a1-45cd-841d-173f3b5e66db.png" width="65%">

    • 🪄 Automatically inferred return type for useFetch and $fetch based on method.

      It'll be a type error to use the wrong method when hitting an endpoint.

      Plus, if you have multiple methods served by a single endpoint (like ~/server/api/test.get.ts and ~/server/api/test.post.ts then the response type will match the kind of response you make.

    • 🍪 useFetch is now integrated with event.$fetch, meaning cookies and context are now passed to api requests automagically within internal requests.

    • 🔥 We now treeshake client-only components out of the server build more effectively using the experimental treeshakeClientOnly feature

      This is turned on by default but if you experience any issues, you can turn this off via:

      export default defineNuxtConfig({
        experimental: {
          treeshakeClientOnly: false
        }
      })
      
    • 🛠️ New addRouteMiddleware kit utility for module authors

    • 💪 Nitropack v2.2 has been released

      Lots of features, including runtime proxy support using route rules, nested fetch calls, binary and raw storage operations, exposed event.context.cf (cloudflare) and built-in session support.

      For full details see release notes

    Changelog

    compare changes

    🚀 Enhancements

    • kit: Add addRouteMiddleware method (#18553)
    • cli: Warn when prerendering routes with ssr: false (#18783)
    • schema: Add type hints for runtime config (#18652)
    • nuxt: Support type auto-import (#18859)
    • nuxt: Infer useFetch return based on the method (#18526)
    • cli: Add initial support for enabling/disabling devtools (#18864)
    • nuxt: Upgrade to nitropack 2.2 (#18889)

    🔥 Performance

    • vite: Use stub entry in vite server build when ssr: false (#18782)

    🩹 Fixes

    • nuxt: Treeshake client-only components with placeholders (#8789)
    • webpack: Client-side typechecking when ssr: false (#18828)
    • vite: Exclude styles, not all assets (#18752)
    • nuxt: Defer adding route path to preloaded record (#18862)
    • nuxt: Don't exclude pnpm layers from nitro esbuild/imports (#9952)
    • nuxt: Use parser to treeshake <ClientOnly> (#8713)
    • Reorder the types field in package.json (#18880)

    💅 Refactors

    • nuxt: Within nuxt app, import directly from source file (#18902)

    📖 Documentation

    • Remove extra word (#18750)
    • example: Fix app config link (#18760)
    • Add useError composable (#8912)
    • Clarify augmenting input/output app config (#8953)
    • Add explanation of composable lifecycle (#8116)
    • typescript: Type-checking guide (#18768)
    • schema: Add NuxtHooks interface documentation (#18756)
    • Resolve preloadRouteComponents page heading error (#18804)
    • Update to nuxt 2.16.0 in bridge installation (#18836)
    • Add link to vue hydration mismatch docs (#18842)
    • Update auto-imports for the server part (#18848)
    • Warn about slots in server components (#18854)
    • Add explanation with augmented meta for new routes (#18901)

    ✅ Tests

    • Decrease vite logging during tests (5426e5609)

    ❤️ Contributors

    Open source →
  58. 3.1.23 Feb 2023
    Release notes

    3.1.2 is a patch release with bug fixes (particularly focusing on performance and DX).

    Changelog

    compare changes

    🔥 Performance

    • nuxt: Simplify generated variable names (#18629)
    • vite: Use compiled regexp for test (#18646)
    • nuxt: Cache result of importing styles module (#18734)

    🩹 Fixes

    • nuxt: Provide fallback values for undefined runtime config (#18586)
    • kit: Don't use default export of defu (#18589)
    • Use named export from defu in all places (#18624)
    • nuxt: Dedupe vue-router (#18626)
    • test-utils: Prevent orphaned processes and use baseURL when loading (#18623)
    • vite: Ensure __publicAssetsURL set before loading assets (#18642)
    • kit: Avoid adding already installed modules to internal _installedModules (#18647)
    • nuxt: Make onNuxtReady safe to run on server-side (#18706)
    • vite, webpack: Omit magic keys when import of same name is detected (#18733)

    📖 Documentation

    • Update vue-gtag plugin example (#18528)
    • Mention virtual file system (#18546)
    • Mention head composable as alternative to useHead (#18552)
    • Use defineEventHandler() to avoid warnings (#18557)
    • Remove unnecessary JSON.stringify() (#18590)
    • Updated unreachable docus url in documentation (#18618)
    • Add link to pages documentation to routing (#18602)
    • Add comment about needing to install @types/node manually (6b2bc680b)
    • Add note about directory import (d2c00dc46)
    • Fix array syntax (f14f3815f)
    • Fix buttons width on getting started (#18643)
    • Add .env to directory structure and improve config docs (#18594)
    • Mention options api equivalent for head() (#18650)
    • Fix broken link to esm section (#18716)
    • Improve routing validate example (#18728)

    🏡 Chore

    ✅ Tests

    • nuxt: Exclude new internal vue assertNumber helper (aa646f065)

    🤖 CI

    • Publish nightly nuxt-edge for nuxt v2 (dd0e2643c)
    • Fix ref for 2.x branch (21badd9f2)
    • Allow manually dispatching nightly nuxt2 build (09114125c)

    ❤️ Contributors

    Open source →
  59. 3.1.125 Jan 2023
    Release notes

    3.1.1 is a bugfix release to address a problem rendering components injected by Vue or Nuxt plugins.

    Update notes

    There's also a Nitro upgrade to v2.1.0 released shortly after v3.1.1, so when upgrading, please either run nuxt upgrade --force or refresh your lockfile.

    Changelog

    compare changes

    🩹 Fixes

    • nuxt: Do not override inferred type of <NuxtPage> (#18495)
    • nuxt: Don't render unknown components with placeholder (#18494)
    • vite: Ensure newly created pages do not return 404 (#18447)
    • nuxt: Async transform for inline middleware (#18460)
    • nuxt: Augment interfaces exported from vue (#18505)

    📖 Documentation

    • Remove useNuxtData release alert (#18488)
    • Simplify the docs directory (#18506)
    • Add info about server-components async limits (#18513)
    • Keep app.vue file name consistent (#18517)

    ❤️ Contributors

    Open source →
  60. 3.1.024 Jan 2023
    Release notes

    3.1.0 is the first minor release after Nuxt 3.0 including bug fixes and enhancements.

    💬 Release Discussion

    👀 Highlights

    • 📖 Lots of improvements to the documentation and website (you can already see them in nuxt.com)
    • 🏝️ Experimental component Islands and server only components
    • ✨ New onNuxtReady, useNuxtData and useSeoMeta composables
    • ﹛ experimental config schema (for module or theme authors)
    • 💪 Upgraded to Nitropack v2
    • ⚡️ Migrated to Vite 4 and Rollup 3.

    Changelog

    compare changes

    🚀 Enhancements

    • nuxt: Experimental server component islands (#5689)
    • nuxt: Add onNuxtReady composable (#9478)
    • useNuxtData composable (#9262)
    • nuxt: Support for extending error.vue in layers (#9521)
    • vite: Upgrade to vite 4 (#9238)
    • nuxt: Deep watch useCookie ref value by default (#9664)
    • vite: Display production build stats (#9761)
    • nuxt: Server-only components (#9972)
    • imports: imports:context hook for unimport context (#9971)
    • vite: Support build.transpile as function (#7767)
    • nuxt: Prefetch middleware/layouts + await layout loading (#10155)
    • nuxt: Support server components with extracted payloads (#10113)
    • kit: Add extendRouteRules method (#9771)
    • nuxt: Allow disabling color for <NuxtLoadingIndicator> (#18432)
    • head: useSeoMeta composable (#18441)
    • Experimental config schema (#18410)

    🔥 Performance

    • nuxt: Use static import of @unhead/ssr (#9826)
    • nuxt: Add tree-shaken useServerSeoMeta composable (#18476)

    🩹 Fixes

    • Remove postcss.config from schema (#9181)
    • nuxt: Include missing <NuxtPage> component props (#9204)
    • nuxt: Allow layouts to receive custom props (#9395)
    • test-utils: Do not hide vitest output (#9442)
    • nuxt: useCookie with defaults should return non-null value (#9449)
    • nuxt: Defer render-blocking prefetches until after load (#9475)
    • nuxt: Speculation rules should be reactive (#9472)
    • kit: Support applying .nuxtignore within external layers (#9599)
    • nuxt: Remove deprecated req/res access (#9636)
    • nuxt: Await plugin asyncdata promises in nuxt hook (#9616)
    • schema: Add hookable dependency (#9648)
    • vite: Skip only vite transform middleware (#9602)
    • nuxt: Remove absolute paths from routes objects (#9655)
    • nuxt: Make dev-only regexp less greedy (#9679)
    • nuxt: Set is loading state for <NuxtLoadingIndicator> after throttle (#9832)
    • cli: Show an error if no value is supplied for the --template flag (#9946)
    • vite: Defer to nitro to copy public dir (#10013)
    • nuxt: Include components runtime dir in build output (#10046)
    • nuxt: Add build.transpile strings to nitro inline list (#10094)
    • nuxt: Support deep assign on empty object for app config (#10087)
    • nuxt: Don't short circuit middleware after validate function (#9180)
    • nuxt: Don't try to override computed layouts in definePageMeta (#9161)
    • nuxt: Allow overriding lower layer composables (#10017)
    • nuxt: Update class prop type for head components (#9133)
    • nuxt: Avoid injecting url helpers into globalThis (#9627)
    • nuxt: Name anonymous components in render tree (#10011)
    • vite: Add additional before skipping vite transform (#10120)
    • kit: Resolve group syntax of ignore (#15884)
    • nuxt: Use query for hashing the fetch key (#18411)
    • cli: Prevent showing stack traces while scaffolding (#9962)
    • nuxt: Provide types for modules as array (#18416)
    • vite: Don't skip loading styles in hydration phase (#18433)
    • vite: Enable css sourcemaps in dev based on sourcemap (#18446)
    • nuxt: Await async callWithNuxt calls (#18443)
    • nuxt: Let router handle internal redirects within middleware (#18445)
    • nuxt: Import onServerPrefetch (629d2c099)
    • Upgrade unimport, close #15594 (#15594)
    • Upgrade unimport (#18475)

    💅 Refactors

    • jobs: Remove unused asset (#9116)
    • nuxt: Fix typo in internal plugin names (#9201)
    • nuxt: Use pathe.join for layer lookup (#9540)
    • Split out type imports from value imports (#9225)
    • nuxt: Remove vue-meta for head support (#9638)
    • nuxt: Do not add all composable auto-imports to globalThis (#9630)
    • vite: Show log when client build is starting (#9759)
    • home: Sections (#9882)
    • Heros (#9886)
    • Improve internal type definitions of <NuxtLink> (#9869)

    📖 Documentation

    • Update to 3.0 and upgrade theme (cd2ad7108)
    • Fix paths to migration guides (#9071)
    • Fix broken paths (#9076)
    • Set nuxt stability to stable (#9075)
    • Fix broken link (24c8653b2)
    • Update redirects (f01fc1863)
    • seo: Add robots file (#9111)
    • Improve images quality (#9112)
    • Fix broken links in examples (#9119)
    • Bump website theme version to 0.1.5 (#9125)
    • Bump nuxt-website-theme to 0.1.6 (71fed589c)
    • Update vercel icon to support dark mode (a4768fd56)
    • Update website-theme version (16117060e)
    • Fix typo in commands/add (#9206)
    • Remove stable release warning regarding options api (#9186)
    • Fix typos in modules section (#9227)
    • Updated info about 404.vue (#9155)
    • External configuration table (#9189)
    • homepage: Optimize gem textures (#9234)
    • Add space between sentences (#9207)
    • Improve seo titleTemplate and add social images (#9235)
    • Update link to mdc extension (#9251)
    • Add missing space (#9276)
    • partners: Add brain agency partner (#9277)
    • Bump website theme to 0.1.11 (#9299)
    • Add warning about .client onMounted hook (#9263)
    • Use layout in example of definePageMeta (#9322)
    • schema: Add example and description for imports.dirs (#9346)
    • Change app-config url to avoid naming conflicts with app.vue (#9377)
    • Add redirect for app.config to app-config (66efcd59d)
    • installation: Add button to nuxt.new (7c998982f)
    • installation: Typo in sentence (53d5a5a5a)
    • roadmap: Add i18n module to the roadmap (#9403)
    • Add more social cards (a50855bab)
    • Bump version to 0.1.12 (#9423)
    • seo: Add sitemap url to robots.txt (#9309)
    • introduction: Add hero and cards (#9334)
    • Disable markdownlint on mdc file (#9428)
    • homepage: Fix typo (#9426)
    • Add Project name placeholder (#9421)
    • Update announcements to add stable release (a73a75c39)
    • Theme version 0.1.13 (#9453)
    • Website theme 0.1.16 (#9456)
    • Update playwright url (#9483)
    • Make vite monospace too (#9490)
    • Update agencies expertises (d36d11552)
    • Add nuxt layers introduction and authoring guide (#9405)
    • Heading and formatting improvements for layers (c307ee8b5)
    • Update website-theme (cf4e7bf33)
    • Update internal links to bridge overview page (228bc9ce2)
    • Recommend to install non-edge version of @nuxt/test-utils (#9543)
    • Compress social image to jpg and upgrade website-theme (770cdf90d)
    • agencies: Add liip (#9552)
    • Fix typo and update theme (d500ac4e3)
    • Update theme version (5fdb7b6f8)
    • rendering: Hide light image in dark mode (#9620)
    • Update examples link (#9152)
    • Add docs for preloadRouteComponents (#9607)
    • Add missing line breaks (#9671)
    • Indicate navigateTo options are optional (#9672)
    • Add community page (#9519)
    • Bump website theme to 0.1.23 (#9703)
    • community: Fix client-side images display (#9704)
    • theme: Version 0.1.24 (#9716)
    • version: Theme 0.1.25 (#9729)
    • community: Temporary disable newsletter subscription (#9740)
    • concepts: Add utils/ to directory-based auto-imports (#9739)
    • Link to nuxt.com instead of v3.nuxtjs.org (#9786)
    • Version 0.1.27 (#9788)
    • community: Fix missing image (ce9141285)
    • Improve wording and fix typo (#9795)
    • getting-started: Improve usage of pnpm (#9775)
    • index: Fix typo in 'GitHub' (#9807)
    • Enable hybrid rendering (#9823)
    • Rename svg asset (dbc31869b)
    • Add docs landing page (#9706)
    • homepage: Add module cta (#9591)
    • Fix layouts typo in nuxtignore page (#9893)
    • Fix url for prettier.io pointing to stylelint.io (#9892)
    • Fixed typos and improved wording (#9848)
    • Fix typos and capitalisation (#9844)
    • Clarify plugins are auto-registered, remove components default (#9815)
    • Fix markdown (#9838)
    • Fix typos (#9919)
    • release: Theme 0.2.2 (#9920)
    • example: Fix runtimeConfig extension in config-extends example (#9912)
    • sponsors: Fix hero (#9941)
    • configuration: Clarify the location of app.config.ts in the source directory (#9937)
    • support: Update wording (#9821)
    • Refactor cards (#9935)
    • guide: Fix the link to deploy in guide/.output (#9994)
    • Update generate doc to include --dotenv (#9991)
    • Remove nuxt 2 information from generate schema (#10002)
    • partners: Fix spacing (#10025)
    • Fix typo (#10019)
    • partners: Add macopedia as partner (#10028)
    • Update testimonials (685cb100f)
    • Add back the newsletter (#10032)
    • version: 0.3.5 (#10078)
    • version: 0.3.6 (#10093)
    • Update link (#10056)
    • version: Use nuxt edge channel (#10117)
    • version: Revert back to stable nuxt version (d6c7676f1)
    • Update hooks source line number (#10102)
    • version: 0.3.8 (#10127)
    • Update nested router example (#10115)
    • Add Nuxt: A vision for 2023 post (#10141)
    • Add link! (02df51dd5)
    • Remove stray parenthesis (#10144)
    • Add port example in ecosystem.config (#10076)
    • Add description of returning different status codes (#10059)
    • Add info about extensions and pathPrefix keys (28a2a91b6)
    • version: 0.3.10 (#10170)
    • Fix hydration warnings on 2023 vision article (#10171)
    • Add redirect for workshop (371bc1aff)
    • Remove line break (940720a58)
    • Add buttons slot on PageHero component (#10139)
    • Rename layer0 to Edgio (#9900)
    • Update links to nuxt.com (#18425)
    • examples: Fix error handling example (#18434)
    • Add nuxt 2 section (ce8ad33ed)
    • partners: Update webreinvent description (#18473)
    • Add link to config api (#18474)
    • Update partners (#18482)

    🏡 Chore

    • Update badges in readme to latest (#9065)
    • typo: Link fix (#9070)
    • Update example nuxt versions (#9114)
    • Restore playground config (a4e0a64f3)
    • Update renovate config syntax (6145e0427)
    • Update badges (32e01de8d)
    • Update website version (b7d0f52de)
    • Update link to typescript docs (#10045)
    • docs: Update lockfile and disable style inlining (49d4ce860)
    • docs: Revert vue-lite-youtube-embed upgrade (6652983ba)
    • docs: Revert lockfile (#10063)
    • Case police update (#10085)
    • Fix typo in comment (#10148)
    • Sync templates (1211f62d4)
    • Run renovate against 2.x branch also (0fb147be4)
    • Update internal repo/issue links to usenuxt/nuxt (081dc3254)
    • Trigger ci (7f2637323)
    • Update links to nuxt/framework discussions (a683b1a20)
    • Update more repo links (19973c26f)
    • Disable issue-up on upstream vite repo (c28f1e429)
    • Update lockfile (b2291189b)
    • Bump docs version (#18417)
    • Add 3.x label to feature request template (fa129cb83)
    • Update licence start year (5518e2645)
    • Include central readme/licence when publishing individual packages (#18421)
    • V3.1.0 (963dc0ba8)

    ✅ Tests

    🎨 Styles

    ❤️ Contributors

    Open source →