chore(deps): update dependency nuxt to v3 #708
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.17.1
->3.8.0
Release Notes
nuxt/nuxt (nuxt)
v3.8.0
Compare Source
v3.7.4
Compare Source
✅ Upgrading
As usual, our recommendation for upgrading is to run:
👉 Changelog
compare changes
🩹 Fixes
nuxt/*
exports (#23357)💅 Refactors
consola
and improve test dx (#23302)📖 Documentation
nuxt2
command (#23211)code-block
in migration guide (#23224)callHook
method (#23231)srcDir
JSDoc (#23250)nuxtApp.runWithContext
(#23258)devtools.nuxt.com
(#23350)await
to clarifysendRedirect
is async (#23345)tryUseNuxt
to kit context utils list (#23373)🏡 Chore
.devcontainer
(#22810)🤖 CI
linkChecker
job tolink-checker
(#23319)❤️ Contributors
v3.7.3
Compare Source
👉 Changelog
compare changes
🩹 Fixes
#components
(#23188)💅 Refactors
📖 Documentation
❤️ Contributors
v3.7.2
Compare Source
✅ Upgrading
As usual, our recommendation for upgrading is to run:
👉 Changelog
compare changes
🩹 Fixes
joinURL
with remote sources on NuxtIsland (#23093)data-v
attrs from server component props (#23095)useFetch
auto key (#23086)cssCodeSplit
(#23049)spaLoadingTemplate
if file exists (#23048)tsconfig.json
defaults (#23121)0
(#23127)📖 Documentation
name
param toPageMeta
interface description (#23107)experimental.componentIslands
(#23138)nuxi init
command (#23155)🏡 Chore
🤖 CI
❤️ Contributors
v3.7.1
Compare Source
✅ Upgrading
As usual, our recommendation for upgrading is to run:
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
🩹 Fixes
ssr: false
(#22869)priority
when registering components dirs (#22882)addLayout
(#22902)true
(#22905)write: false
for type templates (#22972)shouldExternalize
(#22991)destr
in more places overJSON.parse
(#22997)📖 Documentation
<NuxtPage>
(#22912)pageKey
(#22920)env
object for nuxt plugins (#22963)NuxtLayout
(#22989)🏡 Chore
nuxi-edge
rather thannuxi-ng
(9610cf03d)🤖 CI
GITHUB_REF_NAME
to get branch for release (d49ea58de)❤️ Contributors
v3.7.0
Compare Source
👀 Highlights
🐣 A New CLI
We've refactored
nuxi
using unjs/citty and this marks the first Nuxt release that depends on the new version, safely in its own repository. We have grand plans for this - check out some of the features + roadmap discussions in nuxt/cli and please feel free to contribute!Nuxi is now decoupled from the main
nuxt
version - we plan to iterate and release nuxi more quickly in future so you can expect new things coming soon!🕸️ Native Web Streams and
Response
With improvements in unjs/h3 and unjs/nitro, it's now possible to directly return a
Response
object from server routes, meaning it's also possible to return and handle streams natively in Nuxt.👉 Check out the full detail in the unjs/h3 and unjs/nitro release notes.
🔥 HTML Rendering Optimisations
This release comes with a couple of improvements in rendering HTML responses from the server. We now determine whether to preload/prefetch resources at build time (so you can customise this in the
build:manifest
hook). We also now manage rendering the HTML for them directly inunhead
(#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 inunhead
: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 thevite:extendConfig
andwebpack:config
hooks.For example:
⚡️ 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 abaseUrl
. 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
:👓 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:
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
$client
and$server
vite env overrides (#22302)$client
and$server
overrides (#22304)scrollToTop
page meta (#21741)app:templatesGenerated
hook (#21935)unhead
(#22179)@nuxt/webpack-builder
when needed (#21747)writeTypes
utility (#22385)setPageLayout
/<NuxtLayout>
(#22362)import.meta.*
build flags (#22428)node_modules
(#22478)webpack
/nitro
/postcss
config (#22521)global: 'sync'
components (#22558)app.rootId
optional (#22528)experimental.headNext
unhead integration (#22620)bun
package manager (#22673)routeRules
defined within pages (#20391)hidden
sourcemaps (#22787)nuxt/cli
(#22799)./schema/config.schema.json
subpath (#22813)🔥 Performance
nuxt/config
(#22391)capo.js
head tag order (#22431).toLowerCase()
(#22743)🩹 Fixes
prerender:routes
hook (#22247)scrollBehaviorType
(#22264)asyncData
generic + default (#22258)createClientOnly
render function to ctx (#22289)build.extend
(#22305)validate
return typing to be either error or boolean (#22323)hasNuxtModule
(#22316)builder:watch
(#22333)useFetch
hash (#22378)watch
paths against all layersrcDir
s (#22307)name
is an optional prop for<NuxtLayout>
(0d9a0b753)useFetch
(#22418)baseUrl
and use relative paths in tsconfig (#22410)injectHead
usage (#22447)useCookie
(#22474)internal:nuxt
namespace (9b0d371b0)normalize
call (14bf2b02f)webpack
options should be optional (#22524)app.config.ts
files (#22494)hookable
to externals list (4552d39c4)app.{rootId ([rootTag}
(#22543)](nuxt/nuxt@rootTag}\` (#22543)))import.meta
build vars indefine
as well (#22576)page:finish
(#22566)distDir
after first build (#22614)''
key for root scope in variable collector (#22679)exclude
paths to nitrotsconfig.server.json
(#22768)asyncData
whenimmediate
is disabled (#20980)spaLoadingTemplate
tofalse
(#22798)unctx
where possible (#22811)💅 Refactors
nuxi-ng
for edge releases (#22413)useNitroApp
from subpath (#22785)📖 Documentation
#components
import for dynamic component (#22231).env
section (#22369)NuxtIsland
(#22434)]
in code-block filenames (#22389)scrollToTop
(#22503)status
type foruseAsyncData
(#22511)useSeoMeta
parameters (#22513)pick
(#22531)ReadMore
components (#22541)addServerHandler
example to modules author guide (#22603)server: false
doesn't await on initial load (#22619)import.meta.*
update until v3.7 release (98c17e5d4)NuxtIsland
in server only components docs (#22685)useFetch
docs (#22755)useAsyncData
(#22760)📦 Build
nuxi
(df2bc8a72)🏡 Chore
.eslintignore
file with 'ignorePatterns' (#22547)h3-nightly
on edge releases (#22593)✅ Tests
networkidle
dependency (#22596)🤖 CI
❤️ Contributors
v3.6.5
Compare Source
v3.6.4 release notes
✅ Upgrading
As usual, our recommendation for upgrading is to run:
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
dist
from the default ignore list (#22227)❤️ Contributors
v3.6.4
Compare Source
✅ Upgrading
As usual, our recommendation for upgrading is to run:
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
buildDir
andnode_modules
(#22214)🩹 Fixes
toLowerCase
for possiblemoduleResolution
(#22160)baseURL
to island fetch requests (#22009)--inspect
in dev mode (#22205)📖 Documentation
❤️ Contributors
v3.6.3
Compare Source
✅ Upgrading
As usual, our recommendation for upgrading is to run:
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
🩹 Fixes
unctx
options (4e32e70bb)isExternal
(#21966)experimental
option (0643d4315)💅 Refactors
bundler
module resolution flag (#22142)📖 Documentation
/
(#22118)🏡 Chore
❤️ Contributors
v3.6.2
Compare Source
✅ Upgrading
As usual, our recommendation for upgrading is to run:
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
🩹 Fixes
@nuxt/ui-templates
frommodulesDir
(#21836)nuxi generate
(#21860)tsconfig.json
scope (#21917)typedPages
(#21659)node_modules
to tsconfig include (#21929)$fetch.raw
in dev client mode for islands (#21904)vite.publicDir
(#21847)📖 Documentation
spaLoadingTemplate
link (#21845)<NuxtLoadingIndicator>
(#21952)🏡 Chore
✅ Tests
nuxt-vitest
and composable unit tests (#21884)❤️ Contributors
v3.6.1
Compare Source
✅ Upgrading
As usual, our recommendation for upgrading is to run: