Discover the latest Nuxt updates.
💬 Join the release discussion
Note Make sure to recreate the lock file in the project in case of any issues after the upgrade.
npx nuxi@latest upgrade --forcenuxt dependency to 3.0.0-rc.11 and then use npx nuxi@latest cleanup to cleanup any local cachesWe have introduced Full-Static mode payload extraction in RC.10. Many of the issues from the initial implementation are resolved with this release thanks to your amazing feedback! Notably for SPA routes and state that is now in the initial state.
🧪 We understand that there might be still issues with the new implementation. Please report if spotted any. You can use new experimental.payloadExtraction: false flag in nuxt.config to opt-out as well.
nuxi dev and viteNuxi CLI and unjs/listhen are improved and now support --https flag and ipv6 hosts out of the box with an auto-generated certificate. You can use --ssl-cert and --ssl-key to provide own generated SSL certificates with mkcert for example as well.
Issues with vite HMR and vite-node should be resolved as well. If you were previously using NODE_TLS_REJECT_UNAUTHORIZED or custom vite.server.hmr options for a workaround, you can try to remove them.
Note: If you see something like http://[::]:3000/ when running nuxi preview, it is all normal! The New IPv6 URL works in all modern browsers and is also backward compatible with IPv4 interfaces. If for some reason encountered any issues, try setting HOST to 0.0.0.0 to disable IPv6 listener.
Nitro is the server engine for Nuxt 3. We had landed several fixes in 0.5.2 and 0.5.3 versions improving stability and bug fixes.
nuxi dev --https (#7545)nuxi dev --https working out of the box (#7547)cssSourceMap with new sourcemap format bridge (#7541)ssr:true (#7553)nuxi dev (#7560)state in the initial state instead of extracting it (#7567)vite-node fallback error handler (#7575)ctx.nuxt.options.modulesDir for resolving externals with vite-node (#7612)process.client for early redirect in navigateTo(#7625).vue extensions from component types (#7673)<NuxtLink> prefetching (#7679)addComponent to modules and update addImports (#7543)addImportsSources to list of kit utils (#7636)defineNuxtComponent page (#7618)💬 Join the release discussion
Note Make sure to recreate the lock file in the project in case of any issues after the upgrade.
npx nuxi@latest upgrade --forcenuxt dependency to 3.0.0-rc.10 and then use npx nuxi@latest cleanup to cleanup any local cachesGlobal styles and used component styles are now automatically inlined when server-side rendering a page. This feature helps to improve the First Contentful Paint (FCP) metric.
🧪 You can disable the feature from nuxt.config using experimental: { inlineSSRStyles: false } in case of any issues.
In Nuxt 2, we introduced an amazing feature called Full Static Generation. When using nuxt generate, the payload of each page containing asyncData and state is extracted to a .js chunk and we can deploy output to any static hosting without requiring a hosted API server. This feature also introduced performance benefits to reduce page size and allow smartly prefetching payload of next pages ahead of time when using nuxt generate but kept limited to it.
This feature is now back in Nuxt 3 but much better! Payload is not only extracted during prerendering phase (nuxt generate) but also can be rendered on demand by simply appending /_payload.js to the end of any URL. This made implementation much simpler and also unlocks future development to enable payload rendering for hybrid static server and incremental generated pages. Followup #6411 for the roadmap.
Another goodie ported from Nuxt 2, is automatically prefetching the next pages when a <NuxtLink> is in the viewport.
This feature is integrated with vue-router to prefetch components of the next route and also payload extraction to prefetch the payload of the next pages ahead of time! You can also hook into link:prefetch to do more prefetches.
Nuxt has several configurations for directories including rootDir where nuxt.config, package.json, etc is, and srcDir which is the same as rootDir by default but can be customized to move project code such as pages/ to the src/ directory. With Monorepo becoming more popular, it became clear we need another new option to act smarter in a monorepo.
We have introduced a new workspaceDir configuration. It is automatically detected from rootDir using different heuristics (how?). This option is used to extend the search path for node_modules via #7439 but we will keep spreading its use in other places.
🧪 You can manually set workspaceDir from nuxt.config in case of any issues.
defineNuxtConfig is Auto ImportedNuxt uses unjs/jiti in order to support typescript and ESM syntax for nuxt.config.
When importing { defineNuxtConfig } from 'nuxt' in Nuxt 3, it causes the whole nuxt package to be loaded. It was making startup time slower.
We have introduced a new nuxt/config subpath export that only exports defineNuxtConfig for type support but you don't even need this anymore! Just remove import and enjoy shorter syntax!
-- import { defineNuxtConfig } from 'nuxt'export default defineNuxtConfig({})nuxt initWe have switched to unjs/giget for a much more powerful template init engine.
Normally nuxi init command should work as it was before. If you were using nuxt init org/repo to clone the 3rd party GitHub repository, you should use nuxi init gh:org/repo now.
This new experimental flag allows turning off all Nuxt client js code when server-side rendering a page.
Using this feature is advisable for the very small minority of sites that would not benefit from client-side JS.
You can try this feature by setting experimental: { noScripts: true } and let us know what you think!
history and routes for app/router.options.ts (#7129)mockFn and mockLogger utils (#6235)addImportsSources utility (#7270)immediate option for useAsyncData and useFetch (#5500)clearNuxtData (#5227)clearNuxtData (#7323)unjs/giget for nuxi init (#7361)nuxi init (#7404)workspaceDir option and add it to modulesDir (#7439)<nuxt-link> (#4329)<NuxtPage> (#7492)defineNuxtConfig (#7497)nuxt generate (#7507)createClientOnly wrapper using weakmap (#7297)defineNuxtConfig from nuxt/config (#7485)treeshakeClientOnly flag by default (#7484)navigateTo to 302 Found (#7189)http-equiv correctly (#7190)nuxt-edge current releases (bridge) (#7193)getModuleByUrl (#7260)https through to vite-node (#7271)h3.promisifyHandler (#7275)abortMiddleware to receive a nuxt error or error options (#7335)ssr (#7359)nuxt.config file (#7358)FetchError for useFetch errors (#7435)@vue/runtime-core (#7448)vite-node (#7512)useFetch auto generated key (#7044)useHead composable (#7072)external option of navigateTo (#7188).client and .server components (#7084)useAsyncData signature (#7242)app-config example (#7247)AppConfig to AppConfigInput (#7293)nuxi prepare command (#7349)useRuntimeConfig page (#7406)imports.d.ts file (#7474)srcDir example to src/ (#7503)node to export conditions (0cc49e2a)💬 Join the release discussion
app.config.ts with HMR and Reactivity support (see documentation and example)autoImports option and hooks is deprecated and renamed to imports (#6864) (#7158)Nuxt version ^3.0.0 is required but currently using 3.0.0-rc.9, please contact the module author..js extension for client (#6505)vite-node by default (#6217)app.config with HMR and reactivity support (#6333)getRouteFromPath to use objects (#5900)add command (#3921)imports.autoImport option to disable auto-imports (#6768)navigateTo supports external redirects (#5022)app.config improvements (#6905)setPageLayout utility (#6826, #7075)theme config (#7131)autoImports to imports (#6864)autoImports deprecation dx (#7158)server.port and server.host with listener info (#6595)#components alias to tsconfig (#6634)initialCache is disabled (#6640)ssr condition (#6649)nuxi upgrade runs in rootDir (#6707)vue-devtools-stub to mock @vue/devtools-api for both cjs + esm (#6713)vite-node module invalidation (#6736)vue in client bundle (#6735)ssr: false (#6901)manifest.json from public dir (#7021)@nuxtjs/eslint-config-typescript v11 (#7114)meta:register hook (#7130)fallbackTag in ClientOnly examples (#6587)autoImports (#6615)defineEventHandler example (#6741)<NuxtWelcome /> component docs (#6745)useNuxtApp composable (#6786)addRouteMiddleware util (#6894)abortNavigation util (#6936)defineNuxtRouteMiddleware util (#6933)definePageMeta util (#6931)dev:preview script for playground preview (#6961)nitropack-edge on release (#7036)Note This version includes hotfixes from rc.7. Check v3.0.0-rc.7 release notes for all changes between rc.6...rc.8
Warning There are slight API changes with this release candidate.
💬 Join the release discussion
npx nuxi-edge@latest upgrade --forcenuxt dependency to 3.0.0-rc.8 and then use npx nuxi-edge@latest cleanup to cleanup any local cachesnuxi upgrade (#6514)app:rendered to modify ssr context and add render:html (#6521)/@fs from external ids (#6529)srcDir rather than rootDir (#6546)info to danger for the pages root element (#6528)Warning There are slight API changes with this release candidate. Please check the linked issues marked with ⚠️
Warning This release contains some regressions. Please upgrade to the latest v3.0.0-rc.8
vue-tsc (#6012)composables/ with glob support (#6025)nuxi cleanup command (#6125)<NoScript> component and noscript typings (#6139)app:rendered and render:response hooks (#6042)components/global dir (#6070)app.vue (#6228)fetchpriority attribute and literal typings for meta components (#6251)followSymbolicLinks option for resolveFiles (#6240)setResponseStatus utility (#6306)vue-bundle-renderer@0.4 (#6210)#imports to improve tree-shaking (#5763)#internal/nitro alias internally (#5987)statusCode type to number for error page template (#6010)imports.d.ts (#6054)baseurl when pruning manifest (#6063)tsconfig.json for vue-tsc type checker (#6069).env file before starting dev server (#6119)vite-node runner cache after each render (#6154)<NuxtErrorBoundary> component (#6141)unjs/externality to handle vite-node externals (#6153)useHead to accept computed values (#6174)DeepPartial (#6176)vite.vue options (#6220).mjs to use crossorigin preloads (#6232)resolvePath with absolute input (#6233)nuxt.config import protection (#6279)body: true (#6293)200.html and 404.html spa fallback files (#6308)<script setup> from comment (#6331)vite-node hmr (#6343)esmResolve flag for jiti (#6356)useRoute return (#6395)listhen (#6434)404 and showError as fatal by default (#6437)viteServerDynamicImports as experimental flag (#6433)module type to vite node entry (#6448)useAsyncData (#6441)node_modules have lower scanning priority (#6382)asyncData handler (#6472)useFetch and useLazyFetch request type (#4825)null handling for titleTemplate (#6487).nuxt/tsconfig.json for tests (#5967)useState should only contain JSON-serializable content (#5994)createError import (#6050)<NuxtLayout> component docs (#6264)theme-color meta (#6250)2cbdc5c)✅ RC.6 is a hotfix release fixing known issues with previous releases
treeshakeClientOnly flag (#5934)vite-node (#5854)viteExtendConfig callback once (#5929)build.watch options for production build (#5958)types field (#5962).env variables to nuxt app in production (#5879)initialCache to UseFetchOptions types (#5908)See all changes: https://github.com/nuxt/framework/compare/v3.0.0-rc.5...v3.0.0-rc.6
This release is featuring 25+ bug fixes, keyless composables,
Feedback about the release: Join the discussion
See all changes: https://github.com/nuxt/framework/compare/v3.0.0-rc.4...v3.0.0-rc.5
This release contains slight breaking changes. Please check the linked pull requests for notes.
addServerHandler to use method suffix of the file path (#5465)addVitePlugin (#5560)addLayout utility (#5537)useFetch (#5660)custom prop for <nuxt-link> (#4249)<NuxtLoadingIndicator> component WIP (#5121)vite: hooks (#5472)getCurrentInstance for useNuxtApp (#5456)cssnano is enabled if not dev (#5583)vue-demi (#5721)useRequestHeaders type should allow for undefined values (#5748)useFetch key warning to include any function or blob (#5710)undefined when applying defaults for useAsyncData (8d2f805)vite-node circular reference (#5764)ssr: false (#5773).mjs (#5817)process.dev in nitro bundle (#5852)vue-router and @vue/devtools-api bundling (#5874)nuxt/image issue (#5490)useFetch options (#5562)hello.ts to [...hello].ts (#5261)pnpm usage (#5597)<NuxtPage> component (#5591)definePageMeta only works in the pages directory (#5663)NODE_ENV behavior (#5739)useFetch uses isomorphic $fetch (#5769)anavigateTo docs (#5701)NuxtLoadingIndicator component src (#5776)defineLazyHandler in wasm example (#5797)toUTCString in useAsyncData example (#5798)nuxt-link (#5819)See all changes: https://github.com/nuxt/framework/compare/v3.0.0-rc.3...v3.0.0-rc.4
This release contains commutative enhancements from RC.3. Thanks to all of the contributors to the code and documentation 💚
global with globalThis (#4958)<template> (#4904)file:// protocol to vite-node entry file path (#4966)titleTemplate (#5064)navigateTo from 301 to 302 (#5173)title, bodyAttrs and htmlAttrs (#5184)navigateTo options using server middleware in server-side (#5145)RouterView props in NuxtPage (#5272)mode config correctly (#5255)ssrContext types on NuxtApp (#5333)useAsyncData (#5340)isIgnored (#5375)build.transpile (#5043)node_modules (#5042)resolveComponent (#5428)NODE_ENV value with a warning (#5417)extractCSS by default (#4388)vue peer dependency (#5190)alias example (#4995)useFetch and useAsyncData (#4974)useFetch docs for body type and additional ohmyfetch options (#4985)navigateTo options (#5044)useState with same key (#5059)NUXT_APP_CDN_URL environment variable (#5032)--prerender flag to nuxi build command (#5112)key option for useFetch (#5089)--no-clear flag in the documentation of development server (#5197)NuxtLayout in app.vue with pages (#5225)titleTemplate (#5093)useRequestEvent (#5326)useRouter composable (#4949)defineEventHandler (#5405)serverHandlers/devServerHandlers shortcuts to register custom handlersrouter.resolve to resolve initial urlssr: falserouter.push on ssruseFetch with transform optionuseAsyncData and useFetcherror.data in responsetsconfignuxi init outputDeepPartialnitro:build:before hook[[default optioncomposables/ directory.env is not read in productionuseFetch example consistent with othersruntimeConfiguseAsyncData example[[If you are relying on [slug] at the end of a route to generate an optional parameter, you will need to rewrite it as [[slug]].
3.0.0-rc.1 "Mount Hope"🚀 Check out the Announcing Nuxt 3 Release Candidate for more information about this release!
nuxt3 edge releasesIf you are already a beta tester of nuxt using nuxt3 package, please follow the steps below to use RC.1:
.nuxt, package.lock.json, yarn.lock and node_modulesnuxt.config to import defineNuxtConfig from nuxt instead of nuxt3:- import { defineNuxtConfig } from 'nuxt3'+ import { defineNuxtConfig } from 'nuxt'export default defineNuxtConfig({ ... })package.json{ "devDependencies": {- "nuxt3": "latest"+ "nuxt": "^3.0.0-rc.1" }}Alternatively, you can use "nuxt": "npm:nuxt3@latest" to keep using the latest edge releases of Nuxt 3.
For Nuxt 3 modules created by new module-builder toolchain, also update @nuxt/kit dependency to use RC.1 in package.json:
{ "dependencies": {- "@nuxt/kit": "npm:@nuxt/kit-edge@latest"+ "@nuxt/kit": "^3.0.0-rc.1" }}