-
Couldn't load subscription status.
- Fork 1
chore(deps): update dependency nuxt to v4 #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
bbbf73f to
ab314a8
Compare
ab314a8 to
a6ae7f5
Compare
dc849b1 to
4c1b660
Compare
4c1b660 to
ec7985a
Compare
ec7985a to
be62408
Compare
be62408 to
9aed369
Compare
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the WalkthroughThe change involves updating the Changes
Poem
Comment |
9aed369 to
4630fb7
Compare
4630fb7 to
dceee5d
Compare
dceee5d to
73cfbb9
Compare
26956f2 to
89ec3cf
Compare
d5a5f83 to
e9c5a87
Compare
e9c5a87 to
1d9820a
Compare
1d9820a to
475d18d
Compare
2586373 to
0868c6b
Compare
0868c6b to
7bc00ba
Compare
9823151 to
3cf6204
Compare
3cf6204 to
b577c0e
Compare
b577c0e to
8c3addd
Compare
8c3addd to
ead2384
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
nuxt/package-lock.jsonis excluded by!**/package-lock.json
Files selected for processing (1)
- nuxt/package.json (1 hunks)
Additional comments not posted (1)
nuxt/package.json (1)
14-14: Verify compatibility with Nuxt 3 and review migration steps.The update from Nuxt 2 to Nuxt 3 is a major version change and may introduce breaking changes. Ensure that the application is compatible with Nuxt 3 and review the Nuxt 3 migration guide to address any necessary changes.
ead2384 to
9c3438c
Compare
9c3438c to
3770e56
Compare
3770e56 to
9d5564d
Compare
199e4b9 to
d218427
Compare
d218427 to
51cdd7b
Compare
1572e22 to
3174b28
Compare
3174b28 to
edb6194
Compare
edb6194 to
e705410
Compare
e705410 to
a69f881
Compare
7796d55 to
5a52650
Compare
5a52650 to
b691cf3
Compare
b691cf3 to
0209ae8
Compare
0209ae8 to
721ee21
Compare
721ee21 to
b3788fd
Compare
b3788fd to
5fd11a3
Compare
ce3d44f to
a1a9583
Compare
a1a9583 to
876725a
Compare
876725a to
6c3833a
Compare
798c8c0 to
047659e
Compare
788d545 to
008cd4a
Compare
7d5216d to
37e4a26
Compare
37e4a26 to
7dd5096
Compare
7dd5096 to
d17444e
Compare
d17444e to
4ff0fb8
Compare
4ff0fb8 to
b90f748
Compare
This PR contains the following updates:
2.15.8->4.2.0Release Notes
nuxt/nuxt (nuxt)
v4.2.0Compare Source
👀 Highlights
We're excited to announce Nuxt 4.2, bringing new capabilities for better TypeScript DX, enhanced error handling, and improved control over data fetching! 🎉
🎯 Abort Control for Data Fetching
You can now pass an
AbortControllersignal directly touseAsyncDataanduseFetch, giving you fine-grained control over request cancellation (#32531).This is particularly useful when you need to abort requests based on user actions or component lifecycle events. The abort signal can also be passed to
refresh()andexecute()methods:🎨 Better Error Pages in Development
When an error occurs during development, Nuxt will now display both your custom error page and a detailed technical error overlay (#33359). This gives you the best of both worlds – you can see what your users will experience while also having immediate access to stack traces and debugging information.
The technical overlay appears as a toggleable panel that doesn't interfere with your custom error page, making it easier to debug issues while maintaining a realistic preview of your error handling.
🔮 Opt-in Vite Environment API
For those wanting to experiment with cutting-edge features, you can now opt into the Vite Environment API (#33492).
The Vite Environment API is a major architectural improvement in Vite 6. It closes the gap between development and production by allowing the Vite dev server to handle multiple environments concurrently (rather than requiring multiple Vite dev servers, as we have done previously in Nuxt).
This should improve performance when developing and eliminate some edge case bugs.
... and it is the foundation for implementing Nitro as a Vite environment, which should speed up the dev server still further, as well as allowing more greater alignment in development with your Nitro preset.
This is also the first breaking change for Nuxt v5. You can opt in to these breaking changes by setting
compatibilityVersionto5:Please only use this for testing, as this opts in to unlimited future breaking changes, including updating to Nitro v3 once we ship the Nuxt integration.
📦 New
@nuxt/nitro-serverPackageWe've extracted Nitro server integration into its own package:
@nuxt/nitro-server(#33462). This architectural change allows for different Nitro integration patterns and paves the way for future innovations in server-side rendering.While this change is mostly internal, it's part of our ongoing effort to make Nuxt more modular and flexible. The new package provides standalone Nitro integration and sets the foundation for alternative integration approaches (such as using Nitro as a Vite plugin in Nuxt v5+).
⚡ Performance Improvements
We've also shipped several performance enhancements:
📉 Async Data Handler Extraction
One of the most exciting performance improvements is the new experimental async data handler extraction (#33131). When enabled, handler functions passed to
useAsyncDataanduseLazyAsyncDataare automatically extracted into separate chunks and dynamically imported.This is particularly effective for prerendered static sites, as the data fetching logic is only needed at build time and can be completely excluded from the client bundle.
For static/prerendered sites, enable it in your config:
The extracted handlers are then tree-shaken from your client bundle when prerendering, as the data is already available in the payload. This results in significantly smaller JavaScript files shipped to your users.
🔧 Experimental TypeScript Plugin Support
We're introducing experimental support for enhanced TypeScript developer experience through the
@dxup/nuxtmodule.This module adds a number of TypeScript plugins that aim to improve your experience when using Nuxt-specific features:
import(\~/assets/${name}.webp`)`$fetch,useFetch,useLazyFetch)@dxup/unimportplugin for better navigation with auto-imported composables and utilitiesTo enable this feature, set
experimental.typescriptPlugintotruein your Nuxt configuration:Once enabled, the module will be automatically installed and configured by Nuxt.
🎁 Other Improvements
declarationPath– You can now specify a custom declaration path for components (#33419)resolveModulenow accepts anextensionsoption (#33328)setGlobalHeadutility in kit for easier head management (#33512)🩹 Important Fixes
routeRules(#33222)loadNuxtConfigwith proper cleanup (#33420)hrefnow works correctly in<NuxtLink>(c69e4c30d)h()function (#33509)✅ Upgrading
Our recommendation for upgrading is to run:
This will refresh your lockfile and pull in all the latest dependencies that Nuxt relies on, especially from the unjs ecosystem.
👉 Changelog
compare changes
🚀 Enhancements
declarationPath(#33419)extensionsoption forresolveModule(#33328)useAsyncData(#32531)future.compatibilityVersionto5(22f4693a1)setGlobalHeadutility (#33512)🔥 Performance
🩹 Fixes
routeRules(#33222)loadNuxtConfigin concurrent calls (#33420)hrefin<NuxtLink>(c69e4c30d)mergeModelsfrom auto imports (#33344)shortPathproperty (#33384)declarationPathfrom component dirs (191bcb7e9)isPrerenderedcheck (#33476)h()(#33509)NuxtTimerelative timenumericprop (#33552)NuxtTimerelative timerelativeStyleprop (#33557)optimizeDeps.includefor server environment (#33550)💅 Refactors
shortPathproperty (#33384)extend,extendConfig, andconfigResolvedhooks (e060b9695)@nuxt/nitro-serverpackage (#33462)RouteLocationNormalizedLoadedGenericinternally (b51cb3067)📖 Documentation
addServerPluginnote (#33409)declarationPathinaddComponent(#33380)getLayerDirectories()instead ofnuxt.options._layers(#33484)4.xprefix (5c0bb9285)moduleDependencies(#33499)🏡 Chore
test:prepare(6ef632b82)test:prepare(eca36cfe5)vue-demifromignoredBuiltDependencies(#33494)sincein nightly releases (74ca73ca1)@rollup/plugin-commonjs(cd12980ce)✅ Tests
🤖 CI
@nuxt/nitro-serveron pkg-pr-new (b7ccf17bf)❤️ Contributors
v4.1.3Compare Source
✅ Upgrading
Our recommendation for upgrading is to run:
This will deduplicate your lockfile as well, and help ensure that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
👉 Changelog
compare changes
🔥 Performance
🩹 Fixes
prepare:typeshook (#33239)h(#33046)headoption onuseHead(#33318)cdnURLis set (#33333)imports.dirs(#33334)<NuxtLink>(#33335)v-slot:fallbacklongform syntax in<DevOnly>(#33368)typeFromwhen generating auto-import type templates (#33373)@nuxt/scripts(bed410d60)useAsyncData(#33325)_pathproperty configurable for HMR (#33379)useAsyncDatawith different key on ssr (#33341)💅 Refactors
typed-router.d.tsearly for consistency (#33285)nitro:prepare:typeshook (#33286)filenameintocomponentsIslandsTemplatedefinition (#33394)📖 Documentation
4.xprefix to all internal links (#33264)useFetchreactivity (#33317)4.xprefixes in urls (47ea684c7)nuxt.configpage (b438d44e1)preparecommandNODE_ENVbehavior (#33330)nuxtcommand pages (#33336)🏡 Chore
.npmrc(14514329b)✅ Tests
gotoPathtimeout in CI (f1e5a2d4c)🤖 CI
❤️ Contributors
v4.1.2Compare Source
✅ Upgrading
Our recommendation for upgrading is to run:
This will deduplicate your lockfile as well, and help ensure that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
👉 Changelog
compare changes
🔥 Performance
dstis present (#33200)hydrate-whenlazy hydration strategy (#33199)🩹 Fixes
pkg-typesto dependencies (9fe2541ca)backgroundSizein loading indicator (#33211)enabledfrom components dir options (#32844)📖 Documentation
app/suffix to a few links (#33217)🏡 Chore
✅ Tests
❤️ Contributors
v4.1.1Compare Source
✅ Upgrading
Our recommendation for upgrading is to run:
This will deduplicate your lockfile as well, and help ensure that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
👉 Changelog
compare changes
🩹 Fixes
globalThisoverwindow(#33125)deps.inline(#33133)useRouteusage warning (#33039)imports:sourcesin override warning (#33050)📖 Documentation
--to bun create command (5e661f0ca)app/prefix in lots of cases (#33117)navigateTo(#21442)🏡 Chore
rou3github url (#33130).tsextension (db9d840e1)🤖 CI
4xtags from releases (1cd8a6857)❤️ Contributors
v4.1.0Compare Source
👀 Highlights
🔥 Build and Performance Improvements
🍫 Enhanced Chunk Stability
Build stability has been significantly improved with import maps (#33075). This prevents cascading hash changes that could invalidate large portions of your build when small changes are made:
By default, JS chunks emitted in a Vite build are hashed, which means they can be cached immutably. However, this can cause a significant issue: a change to a single component can cause every hash to be invalidated, massively increasing the chance of 404s.
In short:
Obviously this wasn't optimal. With this new feature, the hash of (otherwise) unchanged files which import the entry won't be affected.
This feature is automatically enabled and helps maintain better cache efficiency in production. It does require native import map support, but Nuxt will automatically disable it if you have configured
vite.build.targetto include a browser that doesn't support import maps.And of course you can disable it if needed:
🦀 Experimental Rolldown Support
Nuxt now includes experimental support for
rolldown-vite(#31812), bringing Rust-powered bundling for potentially faster builds.To try Rolldown in your Nuxt project, you need to override Vite with the rolldown-powered version since Vite is a dependency of Nuxt. Add the following to your
package.json:npm:
{ "overrides": { "vite": "npm:rolldown-vite@latest" } }pnpm:
{ "pnpm": { "overrides": { "vite": "npm:rolldown-vite@latest" } } }yarn:
{ "resolutions": { "vite": "npm:rolldown-vite@latest" } }bun:
{ "overrides": { "vite": "npm:rolldown-vite@latest" } }After adding the override, reinstall your dependencies. Nuxt will automatically detect when Rolldown is available and adjust its build configuration accordingly.
For more details on Rolldown integration, see the Vite Rolldown guide.
🧪 Improved Lazy Hydration
Lazy hydration macros now work without auto-imports (#33037), making them more reliable when component auto-discovery is disabled:
This ensures that components that are not "discovered" through Nuxt (e.g., because
componentsis set tofalsein the config) can still be used in lazy hydration macros.📄 Enhanced Page Rules
If you have enabled experimental extraction of route rules, these are now exposed on a dedicated
rulesproperty onNuxtPageobjects (#32897), making them more accessible to modules and improving the overall architecture:The
defineRouteRulesfunction continues to work exactly as before, but now provides better integration possibilities for modules.🚀 Module Development Enhancements
Module Dependencies and Integration
Modules can now specify dependencies and modify options for other modules (#33063). This enables better module integration and ensures proper setup order:
This replaces the deprecated
installModulefunction and provides a more robust way to handle module dependencies with version constraints and configuration merging.🪝 Module Lifecycle Hooks
Module authors now have access to two new lifecycle hooks:
onInstallandonUpgrade(#32397). These hooks allow modules to perform additional setup steps when first installed or when upgraded to a new version:The hooks are only triggered when both
nameandversionare provided in the module metadata. Nuxt uses the.nuxtrcfile internally to track module versions and trigger the appropriate hooks. (If you haven't come across it before, the.nuxtrcfile should be committed to version control.)🙈 Enhanced File Resolution
The new
ignoreoption forresolveFiles(#32858) allows module authors to exclude specific files based on glob patterns:📂 Layer Directories Utility
A new
getLayerDirectoriesutility (#33098) provides a clean interface for accessing layer directories without directly accessing private APIs:✨ Developer Experience Improvements
🎱 Simplified Kit Utilities
Several kit utilities have been improved for better developer experience:
addServerImportsnow supports single imports (#32289):🔥 Performance Optimizations
This release includes several internal performance optimizations:
🐛 Notable Fixes
useFetchhook typing (#32891)<NuxtTime>(#32893)✅ Upgrading
As usual, our recommendation for upgrading is to run:
This will refresh your lockfile and pull in all the latest dependencies that Nuxt relies on, especially from the unjs ecosystem.
👉 Changelog
compare changes
🚀 Enhancements
ignoreoption toresolveFiles(#32858)onInstallandonUpgrademodule hooks (#32397)rolldown-vite(#31812)defineRouteRulesto pagerulesproperty (#32897)getLayerDirectoriesutil and refactor to use it (#33098)🔥 Performance
🩹 Fixes
satisfiesin page augmentation (#32902)useFetchhooks (#32891)resolvePathand normalize file extensions (#32857)requestTimeout+ allow configuration (#32874)node_modules/if no customsrcDir(#32987)routeobject (#32899)defineNuxtModule().with()(#33081)nuxtApp._runningTransitionon resolve (#33025)💅 Refactors
async/awaitinafterEach(#32999)📖 Documentation
setupTimeoutand addteardownTimeout(#32868)webRootto use new app directory (df7177bff)app/directory in layer guide (eee55ea41)--nightlycommand (#32907)features.inlineStylesdefault value (6ff3fbebb)useRouteand accessing route in middleware (#33004)🏡 Chore
type: 'module'in playground (#33099)✅ Tests
import.meta.dev(#33023)findWorkspaceDirrather than relative paths to repo root (a6dec5bd9)expect.poll(53fb61d5d)expect.pollinstead ofexpectWithPolling(357492ca7)vi.waitUntilinstead of custom retry logic (611e66a47)🤖 CI
❤️ Contributors
v4.0.3Compare Source
👉 Changelog
compare changes
🔥 Performance
tinyglobbyinresolveFiles(#32846)🩹 Fixes
errorvariable (#32807)typeCheck(#32835)nullresult from webpack call (84816d8a1)reverseResolveAliasfor better errors (#32853)📖 Documentation
bun.lockfor lockfile (#32820)🏡 Chore
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.