v3.14.0
NuxtJS#nuxt
3.14.0 is the next minor release.
π Highlights
Behind the scenes, a lot has been going on in preparation for the release of Nuxt v4 (particularly on the unjs side with preparations for Nitro v3!)
jitiLoading the nuxt config file, as well as modules and other build-time code, is now powered by jiti v2. You can see more about the release in the jiti v2 release notes, but one of the most important pieces is native node esm import (where possible), which should mean a faster start. β¨
You should never import Vue app code in your nitro code (or the other way around). But this has meant a friction point when it comes to sharing types or utilities that don't rely on the nitro/vue contexts.
For this, we have a new shared/ folder (#28682). You can't import Vue or nitro code into files in this folder, but it produces auto-imports you can consume throughout the rest of your app.
If needed you can use the new #shared alias which points to this folder.
The shared folder is alongside your server/ folder. (If you're using compatibilityVersion: 4, this means it's not inside your app/ folder.)
rspack builderWe're excited to announce a new first-class Nuxt builder for rspack. It's still experimental but we've refactored the internal Nuxt virtual file system to use unplugin to make this possible.
Let us know if you like it - and feel free to raise any issues you experience with it.
π To try it out, you can use this starter - or just install @nuxt/rspack-builder and set builder: 'rspack' in your nuxt config file.
We have new useResponseHeader and useRuntimeHook composables (#27131 and #29741).
We now have a new addServerTemplate utility (#29320) for adding virtual files for access inside nitro runtime routes.
We've merged some changes which only take effect with compatibilityVersion: 4, but which you can opt-into earlier.
- previously, if you had a component like
~/components/App/Header.vuethis would be visible in your devtools as. From v4 we ensure this is, but it's opt-in to avoid breaking any manualyou might have implemented. (#28745). - Nuxt scans page metadata from your files, before calling
pages:extend. But this has led to some confusing behaviour, as pages added at this point do not end up having their page metadata respected. So we now do not scan metadata before callingpages:extend. Instead, we have a newpages:resolvedhook, which is called afterpages:extend, after all pages have been augmented with their metadata. I'd recommend opting into this by settingexperimental.scanPageMetatoafter-resolve, as it solves a number of bugs.
πΊοΈ Roadmap to v3.15
They didn't quite make it in time for v3.14 but for the next minor release you can expect (among other things):
- auto-imported directives from modules (#29203)
- 'isolated' page renders (#29366)
- delayed hydration (#26468)
β Upgrading
As usual, our recommendation for upgrading is to run:
npx nuxi@latest upgrade --force
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
π Changelog
π Enhancements- deps: Upgrade to latest version of jiti (#27995)
- kit,nuxt,vite,webpack: Reimplement cjs utils using
jiti(#29073) - nuxt: Normalise component names to match nuxt pattern (#28745)
- kit,schema: Add
addServerTemplateutility (#29320) - nuxt: Add
useResponseHeadercomposable (#27131) - rspack,webpack: Add
rspackbuilder (#29142) - nuxt,schema:
pages:resolvedhook + scan meta post extend (#28861) - nuxt: Allow enabling route props in
definePageMeta(#29586) - schema,nuxt: Add
shared/folder and#sharedalias (#28682) - nuxt: Allow chunk error or manifest update -> reload (#28160)
- nuxt: Add
useRuntimeHookcomposable (#29741)
π₯ Performance
- nuxt: Remove unneeded second call to
useNuxtApp(#29514) - vite: Avoid redundant postcss plugins overwrite (#29619)
- kit,nuxt,vite,webpack: Hoist regex patterns (#29620)
π©Ή Fixes
- nuxt: Simplify plugin
InjectionTypetemplate conditional (#29023) - nuxt: Access server build from
webpackΒ memfs (#29027) - nuxt: Do not resolve non-absolute component paths (#29036)
- nuxt: Defer unsetting error handler until suspense resolves (#29037)
- nuxt: Pass
DOMExceptionas fetch abort exception (#29058) - vite: Don't force protocol if disabled
devServer.https(#29049) - nuxt: Empty nitro
buildDirin dev mode (#29068) - nuxt: Don't resolve relative import type paths for deps (#29069)
- kit: Handle passing 'bare' relative paths to modules (c7fecd8a1)
- kit: Try resolving module path from each node_modules dir (70a622d43)
- kit,vite,webpack: Resolve postcss paths from each modules dir (#29096)
- kit,vite,webpack: Strip
node_modules/from parent urls (5bd42c893) - nuxt: Add
crossoriginattribute for stylesheets (#29138) - nuxt: Use
routeRulesto hint pages to prerender (#29172) - nuxt: Pass absolute external link urls to
link:prefetch(#29321) - nuxt: Error on build when required module is missing (#29287)
- nuxt: Prevent 404 when hitting component test endpoint (cb725f014)
- nuxt: Avoid throwing 404 error before middleware finishes (#29054)
- schema: Use
ConfigLayertype fromc12(#29370) - nuxt: Fix nested page types in
typedPages(#29352) - nuxt: Allow islands to manipulate head client-side (#29186)
- vite: Dim repeat count in logs (#29392)
- schema: Mark
configFileas required in layer type (3bbcd7d21) - nuxt: Remove vue compiler hints from auto import (#29713)
- vite: Update signature for
createIsExternal(686be8168) - nuxt: Respect existing
propsvalue indefinePageMeta(#29683) - schema: Hoist
nitropack/typesto ensure api routes are typed (54096875e)
π Refactors
π Documentation
- Use
defineNuxtComponentinstead ofdefineComponent(#29011) - Remove duotone icons for clarity (#29040)
- Fix typo (#29045)
- Remove specific Nuxt 4 release date (#29151)
- Remove redundant newlines and indentations (#29190)
- Add links to short videos from daniel (#29185)
- Fix comments typo in auto-imports example (#29195)
- Add missing word (#29230)
- Add a section about
useRequestFetchandevent.$fetch(#29099) - Add example of typing custom
useFetcherrors (#29253) - Ensure manifest code snippet works with pnpm (#29273)
- Consistent directory structure (#29292)
- Update to new
ofetch...

Generated by RSStT. The copyright belongs to the original author.