You are reading Nuxt 2 docs. Head over nuxt.com for Nuxt 3 docs.
Discover all the release notes for the Nuxt framework
Released on May 21, 2023
3.5.1 is a patch release, with bug fixes and performance improvements.
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.
/
route (#20894 )
useFetch
method when generic is passed (#20797 )
refresh
when hydrating when data is present (#20916 )
default
type for initial value for composables (#20968 )
resolvePath
to handle edge cases for modules (#20975 )
pnpm test
command to run whole test suite (4907660ff )
experimental.renderJsonPayloads
(891ba880e )
useAsyncData
and useFetch
types (#20935 )
useState
(#20249 )
pages/
docs (#20976 )
Released on May 16, 2023
3.5.0 is a minor (feature) release with lots of new features to play with.
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 (#20777 ), thanks to @antfu and @baiwusanyu-c .
defineOptions
macro
Read the full release announcement for more details.
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 .
Rich JSON payload serialisation is now enabled by default (#19205 , #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 .
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 (#20284 ).
You can follow the server component roadmap at #19772 .
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: #20329 .
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
}
})
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
.
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 (#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.
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.
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.
prepend
option to addImportsDir
(#20307 )
vite:configResolved
hook (#20411 )
webpack:configResolved
hook (#20412 )
addVitePlugin
and addWebpackPlugin
(#20525 )
nuxi analyze
from cli (#20387 )
nuxtApp.runWithContext
(#20608 )
typedPages
option (#20367 )
runWithContext
within callWithNuxt
(#20775 )
useRequestURL
helper (#20765 )
<DevOnly>
(#20817 )
addBuildPlugin
for builder-agnostic implementation (#20587 )
NuxtClientFallback
(#20336 )
@nuxt/devtools
module before core modules (#20595 )
<FragmentWrapper>
(#20607 )
useError
is called with nuxt app context (#20585 )
nuxt_component
ssr style and isVue
(#20679 )
build.extend
hook (#20605 )
fs.allow
dirs to include app files (#20755 )
.env
changes (#20501 )
<DevOnly>
from parsed html (#20840 )
pages:extend
to enable pages module (#20806 )
scrollBehavior
(#20859 )
runtimeCompiler
option out of experimental (#20606 )
resolvePath
(#20756 )
useCookie
does not share state (#20665 )
navigateTo
examples (#20678 )
useSeoMeta
and useServerSeoMeta
pages (#20656 )
<NuxtLayout>
when migrating error.vue
(#20690 )
await
before lazy composable examples (7e7e006e9 )
pinia
(#20778 )
markdownlint-cli
update and prevent auto-update (675445f98 )
@ts-ignore
(4f0d3d4ae )
.only
in tests (ad97cb45a )
.mjs
files (#20711 )
pnpm-workspace.yaml
(#20751 )
externalVue
removal (a33d2e7ae )
Released on April 28, 2023
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.
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.
timeEnd
unless we're debugging (#20424 )
<ClientOnly>
(f1ded44e8 )
event.node.req
in cookie utility (#20474 )
devServer.https: true
(#20498 )
/__nuxt_error
directly (#20497 )
callAsync
for executing hooks with context (#20510 )
app:error
in SSR before rendering error page (#20511 )
asyncData
(#20535 )
#components
imports into direct component imports (#20547 )
RenderResponse
for redirects (#20496 )
vue-router
docs (#20454 )
nuxt-edge
with provenance (753c4c2a3 )
Released on April 20, 2023
3.4.2 is a patch release with the latest bug fixes and performance improvements
Apart from the normal bug fixes, we have a couple things we should call out.
@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.
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.
@parcel/watcher
for dev watcher (#20179 )
useRequestHeaders
keys as optional (#20286 )
@jest/globals
(#20360 )
rootDir
when preparing project (#20401 )
isJS
and isVue
utilities consistently (#20344 )
isFileServingAllowed
util (#20414 )
@ts-ignore
and fix some issues (#20273 )
Released on April 13, 2023
3.4.1 is a patch release. We've pulled it forward slightly to fix a couple of breaking bugs in 3.4.0.
ssrContext
in spa renderer (#20216 )
<NuxtClientFallback>
(#20237 )
vue-router
normalises url (#20247 )
transform
/pick
(#20186 )
Released on April 11, 2023
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.
https://user-images.githubusercontent.com/904724/231222082-6bd4aeae-3026-407e-b3be-658df6305748.mp4
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
}
})
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.
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.
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 🙏
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.
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.
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).
We've also taken the opportunity to do some cleanup in this minor release.
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.
#head
alias and also disabled the polyfill for @vueuse/head
behaviour by default. (It can still be enabled with experimental.polyfillVueUseHead
.)
experimental.viteNode
option . It can be configured instead with vite.devBundler
.
public
key . This was an undocument compatibility measure with Nuxt 2 and we plan to remove it entirely in v3.5.
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.
useRoute
is used in middleware (#20050 )
watch
with useFetch
(#19823 )
~
/~~
/@
/@@
aliases within layers (#19986 )
dir.pages
in page placeholder (#20079 )
devtools
when it's enabled (#20126 )
experimentalNoScripts
route rule (#19805 )
@vueuse/head
polyfill by default (#20131 )
x-nuxt-no-ssr
header by default (#20024 )
$config
object (#20081 )
useFetch
(#20052 )
@types/node
as a peerDependency (#20025 )
any
(#20105 )
.client
component placeholders (#20093 )
undefined
type for useCookie
return value (4f0b3c722 )
imports.autoImport
(#20180 )
ignorePrefix
to be changed (#20202 )
imports
configuration (#20073 )
headers
option for useFetch
(#20148 )
@pinia/nuxt
module name (#20199 )
overrides
(4a6f85277 )
overrides
(a15a9b66f )
JITI_ESM_RESOLVE
(#20172 )
head_ref
for dependency deduping (ae5df72c5 )
Released on April 2, 2023
3.3.3 is your regularly scheduled bugfix/patch release.
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.
setResponseStatus
signature with h3 (#19987 )
pages:extend
example (72724076b )
mkdist
to 1.2.0
(a96451d2d )
Released on March 24, 2023
3.3.2 is a patch release with plenty of bug fixes.
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.
performance.mark()
(#19687 )
h3
utilities to set response status/code (#19713 )
useAsyncData
(#19225 )
$fetch
in top-level <script setup>
(#19357 )
return
statement (fc7867fb0 )
@nuxt/kit
example with node built-ins (#19873 )
Released on March 14, 2023
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.
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 (#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
(#19422 ).
You can add files to the watch
array to automatically restart the server (#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 (#19084 ). We also landed a couple of fixes on restarting the Nuxt server which should improve your experience when developing.
We've increased static asset maxAge to 1yr as a matter of best practice (#19335 ), and support tree-shaking more of your build (#19508 ). We also now support preloading <NuxtLink>
s with a route in object-syntax (#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 (#19383 ), or to have magic keys automatically injected (#19490 ) - primarily useful for module authors.
We now handle chunk errors by default (#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>
(nuxt/framework#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!
We've migrated to use unhead
directly (#19519 ) - and automatically tree-shake server-only head composables like useServerHead
from your client build (#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 (#19548 ).
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 (#19243 ). We also landed a couple of improvements with stacktraces involving Nuxt hooks (unjs/hookable#69 and unjs/hookable#68 ) implementing console.createTask
.
Before | After |
---|---|
![]() |
![]() |
Types for server API routes are now more correct - with non-serialisable types stripped out of the return type (unjs/nitro#1002 ).
We also now type more of NuxtApp
and correctly type unknown injections for greater type-safety (#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 (#19487 ).
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 (#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 (#19638 ).
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 (#19537 , #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 (#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).
We've been testing out an experimental feature to allow modules and users to extend the Nuxt config schema (#15592 ), and we've now enabled this by default (#19172 ). We expect this will be particularly useful for module and layer/theme authors, and should result in some nicer DX for their users.
restart
hook is called (#19084 )
versions
to runtime nuxtApp (#19064 )
node_modules
and buildDir to x_google_ignoreList
(#19243 )
nuxt/kit
subpath for local use (#19422 )
~/modules
(#19394 )
priority
to allow overriding (#19252 )
trailingSlashBehavior
in defineNuxtLink
(#19458 )
logLevel
(#19369 )
<NuxtClientFallback>
component (#8216 )
watch
option and refactor dev server restarting (#19530 )
useHeadSafe
and remove layer around head imports (#19548 )
nitro:build:public-assets
hook (#19638 )
@vueuse/head
dependency (#19519 )
NuxtLink
(#19379 )
import.meta
types (#19338 )
/
from sourcemapIgnoreList
for windows support (73ade185b )
kit.*
files to published package (#19430 )
transform
(#19487 )
boolean
from inline module definitions (#19621 )
payloadExtraction
warning only when unset (#18516 )
versions
and modules (#19448 )
routeRules
(#19455 )
devServer.https
example (#19486 )
~/server/utils
directory in ~/utils
page (#19500 )
addComponent
jsdoc comment (#19503 )
--log-level
(06b9233b1 )
@nuxt/test-utils
package as external group (#19419 )
hasProtocol
options format (#19555 )
Released on February 28, 2023
3.2.3 is a patch release with bug fixes and performance improvements.
distDir
is unlinked (#19131 )
<NuxtLink>
(#19144 )
rel
attribute on internal link (#19309 )
noExternal
option (#19256 )
Released on February 17, 2023
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
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 #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 #19038 .
app:chunkError
hook and reload strategy (#19038 )
#components
(#19008 )
nuxt/schema
subpath for augmentation (#18922 )
statusCode
is a number (#19001 )
nuxt/app
by default (#19009 )
nuxt/app
from optimised deps (9e789c76c )
isCustomElement
config for jsx transform (#19053 )
devServer
options from nuxt config (#19055 )
//
in path when constructing payload url (#19085 )
nuxi devtools
command (#18888 )
static
property (80f73d39c )
sendRedirect
usage (#19070 )
Released on February 9, 2023
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.
You can opt-in to Nuxt DevTools per-project by going to the project root and running:
npx [email protected] 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.
runtimeConfig
, including inline type helpers 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.
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 } })
addRouteMiddleware
kit utility for module authors
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
addRouteMiddleware
method (#18553 )
ssr: false
(#18783 )
useFetch
return based on the method (#18526 )
ssr: false
(#18782 )
ssr: false
(#18828 )
<ClientOnly>
(#8713 )
useError
composable (#8912 )
preloadRouteComponents
page heading error (#18804 )
Released on February 3, 2023
3.1.2 is a patch release with bug fixes (particularly focusing on performance and DX).
defu
in all places (#18624 )
__publicAssetsURL
set before loading assets (#18642 )
_installedModules
(#18647 )
onNuxtReady
safe to run on server-side (#18706 )
vue-gtag
plugin example (#18528 )
useHead
(#18552 )
defineEventHandler()
to avoid warnings (#18557 )
JSON.stringify()
(#18590 )
@types/node
manually (6b2bc680b )
.env
to directory structure and improve config docs (#18594 )
head()
(#18650 )
validate
example (#18728 )
2.x
branch name (727cf7958 )
assertNumber
helper (aa646f065 )
nuxt-edge
for nuxt v2 (dd0e2643c )
Released on January 25, 2023
3.1.1 is a bugfix release to address a problem rendering components injected by Vue or Nuxt plugins.
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.
<NuxtPage>
(#18495 )
vue
(#18505 )
app.vue
file name consistent (#18517 )
Released on January 24, 2023
3.1.0 is the first minor release after Nuxt 3.0 including bug fixes and enhancements.
onNuxtReady
, useNuxtData
and useSeoMeta
composables
onNuxtReady
composable (#9478 )
useNuxtData
composable (#9262 )
useCookie
ref value by default (#9664 )
imports:context
hook for unimport context (#9971 )
build.transpile
as function (#7767 )
extendRouteRules
method (#9771 )
<NuxtLoadingIndicator>
(#18432 )
useSeoMeta
composable (#18441 )
@unhead/ssr
(#9826 )
useServerSeoMeta
composable (#18476 )
postcss.config
from schema (#9181 )
<NuxtPage>
component props (#9204 )
useCookie
with defaults should return non-null value (#9449 )
.nuxtignore
within external layers (#9599 )
req
/res
access (#9636 )
<NuxtLoadingIndicator>
after throttle (#9832 )
--template
flag (#9946 )
runtime
dir in build output (#10046 )
build.transpile
strings to nitro inline list (#10094 )
definePageMeta
(#9161 )
class
prop type for head components (#9133 )
globalThis
(#9627 )
ignore
(#15884 )
sourcemap
(#18446 )
callWithNuxt
calls (#18443 )
onServerPrefetch
(629d2c099 )
pathe.join
for layer lookup (#9540 )
vue-meta
for head support (#9638 )
globalThis
(#9630 )
<NuxtLink>
(#9869 )
commands/add
(#9206 )
404.vue
(#9155 )
.client
onMounted hook (#9263 )
layout
in example of definePageMeta
(#9322 )
imports.dirs
(#9346 )
vite
monospace too (#9490 )
@nuxt/test-utils
(#9543 )
preloadRouteComponents
(#9607 )
navigateTo
options are optional (#9672 )
utils/
to directory-based auto-imports (#9739 )
pnpm
(#9775 )
layouts
typo in nuxtignore page (#9893 )
runtimeConfig
extension in config-extends example (#9912 )
app.config.ts
in the source directory (#9937 )
guide/.output
(#9994 )
generate
doc to include --dotenv
(#9991 )
generate
schema (#10002 )
Nuxt: A vision for 2023
post (#10141 )
ecosystem.config
(#10076 )
nuxt.com
(#18425 )
vue-lite-youtube-embed
upgrade (6652983ba )
2.x
branch also (0fb147be4 )
nuxt/nuxt
(081dc3254 )
nuxt/framework
discussions (a683b1a20 )
issue-up
on upstream vite repo (c28f1e429 )
3.x
label to feature request template (fa129cb83 )
Released on January 20, 2023
✨ Official Release Announcenment
Check out release candidate notes for older releases and migration steps if you using an older version of Nuxt 3.
runtimeConfig.public
with empty object (#9050 )
latest
tag (#9060 )
useAsyncData
(#9061 )
definePageMeta
issues with transitions and NuxtLoadingIndicator
(#9055 )
Released on January 19, 2023
Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.14
Note This is the last release candidate for Nuxt v3! Are you ready? 👀
nuxt test
(#4578 )
$f
fetch prefix to auto-keys (#8852 )
vitest/node
subpath export (#8815 )
initialCache
option (#8885 )
nuxi generate
(#9018 )
useFetch
key (#6632 )
NuxtRenderHTMLContext.bodyPrepend
(#8712 ) (#8704 )
404.vue
shorthand (#8809 )
head
option support into defineNuxtComponent
(#8901 )
PrivateRuntimeConfig
interface support
- Remove autoImports
option
- Remove autoImports:extend
hook support
- Remove deprecated addAutoImport
and addAutoImport
utilities (use addImports
and addImportsDir
)
- Remove defer
option for useAsyncData
- Remove support for installModule(nuxt, nuxtModule)
- Remove support for module defenition as function
- Remove support for name
in module definition (use meta.name
)
- Remove deprecated throwError
(use showError
)
- Remove deprecated useActiveRoute
(use useRoute
)
- Remove deprecated NuxtConfig
and defineNuxtConfig
imports from nuxt
(import from nuxt/config
)
- Remove deprecated <Script>
component (use useHead
)
- Remove deprecated RouterConfigOptions
interface (use RouterConfigSerializable
)
- Remove deprecated fileName
for template options (use filename
)
- Remove deprecated <NuxtNestedPage>
and <NuxtChild>
components
- Remove deprecated buildModules
config
- Remove deprecated privateRuntimeConfig
and publicRuntimeConfig
options
- Remove deprecated imports.presets[].name
(use presets.imports
instead)
isExternal
to <NuxtLink>
slot props (#8800 )
utils/
directory (#8817 )
onBeforeRouteLeave
and onBeforeRouteUpdate
composables (#8889 )
nuxt test
(#4578 )
.npmrc
and setting for pnpm (#7407 )
null
to unset them (#8769 )
useRequestHeaders
are case-insensitive (#8805 )
$f
fetch prefix to auto-keys (#8852 )
nuxt.config
with .mjs
and .cjs
extensions (#8855 )
dist
from type checking (#8848 )
vitest/node
subpath export (#8815 )
initialCache
option (#8885 )
app.baseURL
when fetching error page on server (#8888 )
<ClientOnly>
component (#8921 )
fs.allow
(#9006 )
nuxi generate
(#9018 )
useFetch
key (#6632 )
NuxtRenderHTMLContext.bodyPrepend
(#8712 )
NuxtRenderHTMLContext.bodyPrepend
(#8704 )
404.vue
shorthand (#8809 )
head
option support into defineNuxtComponent
(#8901 )
defineLazyEventHandler
(#8767 )
useRequestHeaders
composable example (#8833 )
extendPages
(#8860 )
refreshNuxtData
util examples (#8845 )
useHydration
composable (#8768 )
query
option with example for useFetch
(#8719 )
available
(#8966 )
definePageMeta
warning to specify it needs to be in a page (#8923 )
Released on January 19, 2023
Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.11
This release contains multiple security related fixes #8675 , #8674 and #8673 reported via huntr.dev platform by OhB00 .
We recommend you upgrade to the latest version as soon as possible.
If you encounter "The request URL ... is outside of Vite service allow list" issue, try adding path to vite.server.fs.allow
in nuxt.config
. read more .
Using a new method to extract definePageMeta
improves vite performance and makes lazy compilation of pages possible (#8536 ).
We have cleaned up the configuration schema (#8487 ) so that you no longer would be confused with Nuxt 2 options and also can quickly notice any typos in nuxt.config
file.
Typescript strict mode is also enabled by default with this release as best practice. (#8667 )
Using nitro.devProxy
option you can now configure proxies for the development server. (learn more )
app.pageTransition
and app.layoutTransition
by default (#8436 )
useFetch
options reactive (#8374 )
updateTemplates
utility (#8413 )
setPageLayout
is used incorrectly (#8464 )
<devOnly>
component (#7950 )
name
and path
for a route in definePageMeta
(#8633 )
addServerPlugin
utility (#8635 )
prerender:routes
and addPrerenderRoutes
(#8670 )
vite-node
(#8389 )
vue-router
inside <NuxtLayout>
(#8421 )
pathe
to resolve aliases (#8453 )
NITRO_PORT
as well (#8458 )
error.vue
(#8469 )
pages
creation and removal DX (#8502 )
vue-router
to optimized deps (#8544 )
/
if user doesn't have that route (#8639 )
app.pageTransition
and app.layoutTransition
by default (#8436 )
<NuxtLayout>
tag in a code sample (#8349 )
app
key for transitions (#8385 )
<ClientOnly>
to API docs (#8400 )
LinkExample
as block component (#8459 )
<KeepAlive>
in definePageMeta
(#8491 )
typescript.typeCheck
config. (#8632 )
Released on January 19, 2023
Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.12
Note Make sure to recreate the lock file in the project in case of any issues after the upgrade.
npx [email protected] upgrade --force
nuxt
dependency to 3.0.0-rc.12
and then use npx [email protected] cleanup
to cleanup any local caches
RC.12 comes with the first public beta for route rules and hybrid rendering support. Using route rules you can define rules for a group of nuxt routes, change rendering mode or assign a cache strategy based on route! Nuxt server will automatically register corresponding middleware and wrap routes with cache handlers using Nitro caching layer. Whenever possible, route rules will be automatically applied to the deployment platform's native rules (currently Netlify and Vercel are supported).
👉 See docs for examples and more info .
Nitropack upgraded to 0.6 (Release Notes ) and h3 upgraded to 0.8 (Release Notes )
⚠️ Breaking changes: Using defineEventHandler()
or eventHandler()
is now required. If you were previously using a Node.js middleware with (req, res, next?)
syntax you need to wrap them with fromNodeMiddleware()
to convert it into an h3 handler.
useHead
updates This release brings a brand-new version of @vueuse/head
with some significant performance improvements and bug fixes. Check out nuxt/framework#8000 for more details, but in particular:
useHead
⚠️ Breaking changes: The shortcuts viewport
and charset
can only be used within nuxt.config
and not within useHead
directly. For more information on how to update, see nuxt/framework#8000 .
New router options validate
and redirect
are now supported directly in definePageMeta
- so you can perform additional validation for dynamic routes, or implement route redirects directly within pages.
definePageMeta({
// redirect: '/admin',
validate: async (route) => {
const nuxtApp = useNuxtApp()
// Check if the id is made up of digits
return /^\d+$/.test(params.id)
}
})
Nuxt's node server renderer will now respond with 103 Early Hints before the server renders the app, meaning that you should see a decreased TTFB and earlier resource loading in a supported environment - which at the moment is Chrome with your Nuxt app served over HTTPS with newer than HTTP/1.1.
Nuxt's documentation is now written with Nuxt 3's new theming system and the latest Docus and Content module versions. Check it out at https://v3.nuxtjs.org ! Expect more coming soon!
redirect
within page metadata (#7746 )
--dotenv
for dev
, build
and preview
commands (#7660 )
<NuxtLoadingIndicator>
(#7128 )
validate
hook for definePageMeta
(#7870 )
serverDir
(#7868 )
#components
client exports with createClientOnly (#7412 )
ssr: false
route rule to enable SPA mode (#7938 )
@vueuse/head
(#8000 )
<NuxtPage>
to #components
(#8145 )
nuxi build-module
command (#7610 )
routesRules
shortcut (#7954 )
addVitePlugin
and addWebpackPlugin
(#8270 )
vue-router
dependency from minimal app (#8188 )
clearNuxtData
(#7710 )
workspaceDir
in tsconfig include (#7726 )
defineNuxtConfig
for nuxi info
(#7728 )
useFetch
(#7720 )
baseURL
when rendering payload path (#7809 )
noScripts
(#7745 )
^16.11.0
requirement to ^16.10.0
(#7865 )
ssr: false
(#7930 )
setupTimeout
(#7866 )
.client
components (#7422 )
createClientOnly
(#7774 )
index.html
with a server (#7831 )
untyped
dependency (#8064 )
lazyHandle
with defineLazyHandler
(#8049 )
ssr: false
(#8106 )
refresh
to override previous requests by default (#8190 )
app/router.options.ts
file is present (#8193 )
workspaceDir
in tsconfig by default (#8256 )
unref
in layout.ts
(#7818 )
unref
in fetch.ts
(#7813 )
<Script>
component tag in template (#8197 )
writeEarlyHints
from h3
(#8245 )
getRouteRules
from nitropack (#8251 )
useError()
type definition (#7749 )
nuxt/auth
(#7781 )
: ?
(#7928 )
definePageMeta
docs (#7888 )
transitions
page (#7987 )
webp
for 3D gem asset (93c3f30b )
[email protected]
(3218356d )
definePageMeta
(c804daa0 )
NuxtHooks
source (#8128 )
RouterConfig
interface in examples (#8151 )
validate
example (#8231 )
useBody
with readBody
(#8266 )
button-link
(#8275 )
nuxt-link
target types (#8172 )
<NuxtPage>
to #components
(#8145 )
refresh
to override previous requests by default (#8190 )
u
e
Released on January 19, 2023
Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.11
💬 Join the release discussion
Note Make sure to recreate the lock file in the project in case of any issues after the upgrade.
npx [email protected] upgrade --force
nuxt
dependency to 3.0.0-rc.11
and then use npx [email protected] cleanup
to cleanup any local caches
We 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 vite Nuxi 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 )
Released on January 19, 2023
Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.10
💬 Join the release discussion
Note Make sure to recreate the lock file in the project in case of any issues after the upgrade.
npx [email protected] upgrade --force
nuxt
dependency to 3.0.0-rc.10
and then use npx [email protected] cleanup
to cleanup any local caches
Global 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 Imported Nuxt 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 init
We 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 )
runIf
and skipIf
helpers (#7312 )
Released on January 19, 2023
Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.9
💬 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.
(all commits )
.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 )
Released on January 19, 2023
Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.8
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 [email protected] upgrade --force
nuxt
dependency to 3.0.0-rc.8
and then use npx [email protected] cleanup
to cleanup any local caches
nuxi 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 )
Released on January 19, 2023
Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.7
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 )
[email protected]
(#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
)
Released on January 19, 2023
Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.6
✅ 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
Released on January 19, 2023
Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.5
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 )
Released on March 17, 2023
2.16.3 is a patch release with bug fixes.
error()
(#19044 )
less
into namespace (#19738 )
preset
to inner postcssOptions
(#19518 )
node-fetch-native
to externals list (#19755 )
nuxt
(4e9dcddcb )
2.x
version of nuxt instead of latest (#19737 )
Released on March 1, 2023
2.16.2 is a patch release with bug fixes.
The main change in this patch release is that we now patch the crypto
node built-in during build to allow Nuxt 2 to be used on Node versions greater than Node 16, which should ease the pressure users feel after Node 16 reaches its own EOL this year.
Warning This should not be taken for an endorsement of continuing to run with Webpack 4, which is out of date and has a number of dependencies with issues. I expect that number to continue to grow, and we will not be able to resolve all of them. I would strongly urge migrating to Nuxt 3 if possible and the team will do our best to make this possible over the course of the year ❤️
charset
before title
(#18998 )
asyncData
(#18585 )
Released on February 13, 2023
Nuxt 2.16.1 is a patch release with a couple of small bugfixes to last week's 2.16.0 release.
@types
packages depending on webpack 5 (#18827 )
Location
from vue-router
(#18908 )
aba93e9
)
3d034a3
)
daed62a
)
Released on February 3, 2023
Nuxt 2.16.0 is the first minor release since Feb 15, 2021. The focus is mostly on releasing the latest fixes and enhancements that have been present in
nuxt-edge
for some time.
core-js
v3
dotenv
has changed how it parses .env
files in a number of edge cases. glob
now requires /
instead of \
on windows machines. There may also be other changes that affect your usage, so please do upgrade with care.
@nuxtjs/composition-api
. (You can opt-in to just these utilities by disabling the other bridge modules individually.)
nuxtrc
in dist directory (#9280 )
serve-static
middleware (#9365 )
asyncData
return types to component instance type (#9239 )
context.beforeSerialize
method (#9332 )
store
to createRouter
(#9629 )
core-js
version 3 (#9987 )
scroll-margin-top
when navigating with hash (#9187 )
javascript/auto
for js rule (#9180 )
payload.js
(#9494 )
trailingSlash
causes error with dynamic nuxt-child routes (#9505 )
onNuxtLoaded
and onNuxtReady
types (#9510 )
build.stats
options (#9555 )
null
check for $root
access (#9150 )
builder
to getGenerator
(#9574 )
$config
for finding basePath (#9706 )
ufo
(#9739 )
3e9d7e3
)
ua-parser-js
to 1.x (#9979 )
ya-parser-js
to latest 0.7.x
(#9979 )
.cjs
extension to be transpiled (#10340 )
.wasm
extension with lower priority (#10676 )
clear()
(#10086 )
prefetchPayloads
to router options (#9715 )
a53fd32
)
false
option for render.static
(#9372 )
d4e5998
)
39f7859
)
e0968a3
)
5614399
)
17bbb21
)
stripWhitespace
utility (#9668 )
1f85137
)
7614360
)
6f73c36
)
1878b26
)
54542c1
)
773d292
)
bafc814
)
0db7e7b
)
f36fb9c
)
ba966cf
)
ce7b1a9
)
ua-parser-js
version (1cedad5
)
defu
(#18679 )