nuxt-swc
nuxt-swc copied to clipboard
chore(deps): update devdependency nuxt to v3
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| nuxt (source) | ^2.15.3 -> ^3.15.4 |
Release Notes
nuxt/nuxt (nuxt)
v3.15.4
3.15.4 is the next patch release.
✅ 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
🩹 Fixes
- nuxt: Improve error logging when parsing with
acorn(#30754) - nuxt: Clear island uid before saving into the payload (#30767)
- kit: Load
@nuxt/schemafromnuxtpackage dir (#30774) - nuxt: Allow restarting nuxt on paths outside
srcDir(#30771) - nuxt: Don't warn about calling
useRoutein SFC setup (#30788) - webpack: Disallow cross-site requests in no-cors mode (#30757)
- vite: Restore
externalityfor dev server externals (#30802)
💅 Refactors
- vite: Use new rollup
chunk.namesfor asset names (#30780)
❤️ Contributors
- Daniel Roe (@danielroe)
- Peter Radko (@Gwynerva)
- Lansi (@lansi951)
- Julien Huang (@huang-julien)
- Norbiros (@Norbiros)
v3.15.3
3.15.3 is the next regularly scheduled patch release.
👀 Highlights
CORS configuration for dev server
Alongside a range of improvements, we've also shipped a significant fix to impose CORS origin restrictions on the dev server. This applies to your Vite or Webpack/Rspack dev middleware only.
This is a significant/breaking change we would not normally ship in a patch but it is a security fix (see https://github.com/nuxt/nuxt/security/advisories/GHSA-4gf7-ff8x-hq99 and https://github.com/nuxt/nuxt/security/advisories/GHSA-2452-6xj8-jh47) and we urge you to update ASAP.
You can configure the allowed origins and other CORS options via the devServer.cors options in your nuxt.config, which may be relevant if you are developing with a custom hostname:
export default defineNuxtConfig({
devServer: {
cors: {
origin: ['https://custom-origin.com'],
},
},
})
✅ 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
🔥 Performance
- kit,nuxt: Don't resolve paths from local layers/modules (#30650)
- nuxt: Reduce number of
mkdirSynccalls (#30651) - nuxt: Reduce unnecessary template updating (#30684)
- kit: Reduce duplication between
findPathandresolvePath(#30682) - kit: Run components compat check synchronously (#30685)
- nuxt: Early return from annotation for non-object syntax plugins (#30683)
- nuxt: Enable
Transitioncomponent only on client side (#30720)
🩹 Fixes
- vite: Override previous
#app-manifestalias (#30618) - kit,nuxt,schema,vite: Improve watching behaviour (#30620)
- nuxt: Fall back to
plugin.srcfor variable name generation (#30649) - schema: Allow overriding
dev/testenvironment value (#30667) - vite: Drop unneeded call to invalidate module (d2a95c542)
- vite: Add back
invalidateModulecall (9bd71e498) - nuxt: Do not warn about
[[optional dynamic params (#30619) - vite: Inline shared folder in dev mode (#30690)
- nuxt: Deep clone extracted page meta (#30717)
- vite,webpack: Restrict access via cors to local origins + allow configuration via
devServer.cors(406db5b4d)
💅 Refactors
- vite: Drop
externalityand use vite internal config (#30634)
📖 Documentation
- Add link to custom
useFetchexample (#30629) - Fix example command (#30628)
- Fix links to
nuxisource code (4fabe0025) - Add description for prefetch and other details of
NuxtLink(#30614) - Update nuxt/content example (542987627)
- Adjust examples, type and description for
addRouteMiddleware(#30656) - Explain how to use
ClientOnlywithonMountedhook (#30670) - Update links to unhead source (eb5344b43)
- Add more context about
navigationmode incallOncecomposable (#30612) - Add example on how to disable default routes for ssg (#30729)
📦 Build
- schema: Use new
inlineDependenciesoption (01adefcec)
🏡 Chore
- kit: Explicitly inline
lodash-es(0c01273f5) - Add debug timing jiti/unbuild plugins (#30648)
- Do not clobber global tracker objects (df8554331)
- Remove stray console log (47c40f310)
- Improve debugging plugins (492b1ec65)
- Write metrics to disk for better diffing (c5c6b8105)
- Lint (86aff854c)
🤖 CI
❤️ Contributors
- Alex Liu (@Mini-ghost)
- Daniel Roe (@danielroe)
- Alan Schio (@schirrel)
- xjccc (@xjccc)
- Saeid Zareie (@Saeid-Za)
- Zakhar Shymanchyk (@zshimanchik)
- Arturs Jansons (@iegik)
- Maxime Pauvert (@maximepvrt)
v3.15.2
3.15.2 is the next regularly scheduled patch release.
👀 Highlights
🔥 Startup performance improvements
It is worth noting that this release includes some pretty significant performance improvements which you should notice particularly in the startup time. In my tests in the nuxt monorepo,
| fixture | time to vite build complete (v3.15.1) | time to vite build complete (v3.15.2) |
|---|---|---|
| minimal | 850ms | 710ms |
| everything bagel | 3,021ms | 1,690ms |
There's more improvement to do here but hopefully these are good numbers!
📦 CLI refactor
To improve performance within Nuxt projects, we've published a new @nuxt/cli distribution of nuxi, which is used under-the-hood in nuxt (see issue). This should behave exactly the same and nothing needs to be updated in your projects (for example, you will continue to use the nuxi or nuxt commands). The only significant change is that it no longer inlines dependencies. Feedback is welcome 🙏
✅ 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
🔥 Performance
- nuxt: Remove code duplication in client-only (#30460)
- nuxt: Use lighter
@nuxt/clidependency (#30526) - kit: Remove iterations when resolving module path (#30562)
- nuxt: Avoid checking fs for existence of scanned pages (#30581)
- nuxt: Defer version/config warnings to after build (#30567)
🩹 Fixes
- nuxt: Collect all identifiers before extracting page metadata (#30478)
- nuxt: Don't hoist identifiers declared locally in
definePageMetawhen extracting page metadata (#30490) - kit: Reorder
#buildto the end oftsConfigpaths (#30520) - nuxt: Use
fullPathinstead of empty string in router hmr (#30500) - Relax nuxt version constraints to current (23b968289)
- nuxt: Add import protection for
@nuxt/cli(618bbc6da) - kit: Fully resolve plugin paths when normalising them (#30540)
- nuxt: Call
page:loading:endonly once with nested pages (#29009) - nuxt: Warn about ignored char while parsing route segment (#30396)
- nuxt: Allow url-specific chars in vfs (#30584)
- nuxt: Do not warn about invalid characters in route groups/catchalls (0249c74bc)
- vite: Provide fallback alias for
#app-manifest(#30587) - nuxt: Avoid invoking
shouldPrefetchon the server side (#30591) - nuxt: Decode id before resolving relative imports (#30599)
💅 Refactors
- kit,nuxt,webpack: Reduce reassignments (#30589)
📖 Documentation
- Document
--devoption for the module command (#30477) - Document the add layer command (#30476)
- Update v4 release date (#30514)
- Ensure correct type for
urlinuseFetch(#30531) - Update link to
@nuxt/module-buildersource (509cf4a5c) - Add
statusdetail and enhancegetCachedDatareadability (#30536) - Update hash link to correct heading (#30543)
- Update links to unhead source (fef3a59bb)
- Adjust example and additional instructions of
useNuxtData(#30570) - Resolve many twoslash errors (#30573)
- Add context for
useAsyncDataside effects (#30479) - Update examples to use function declarations for clarity (#30588)
🏡 Chore
- Control dependency import into
nuxt/app(1adf3e31f) - Ignore automated renovate node engines updates (6895993fb)
🤖 CI
- Don't block release on fixtures + add pkg.pr.new (#30548)
- Remove concurrency group from release-pr job (8ac54ff10)
❤️ Contributors
- Daniel Roe (@danielroe)
- Alex Liu (@Mini-ghost)
- Anthony Fu (@antfu)
- Camille Coutens (@Kamsou)
- Julien Huang (@huang-julien)
- Peter Buglavecz (@buglavecz)
- ikxin (@ikxin)
- Guspan Tanadi (@guspan-tanadi)
- Vuk Marjanovic (@vmrjnvc)
- Saeid Zareie (@Saeid-Za)
- Matej Černý (@cernymatej)
- Clément Ollivier (@clemcode)
v3.15.1
3.15.1 is the next regularly scheduled patch release.
✅ 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
🔥 Performance
- nuxt: Skip experimental async context transform in client build (#30360)
- schema: Drop unneeded type-only schema dependencies (#30411)
- rspack,webpack: Drop
lodash-esdependency (#30409) - nuxt: Drop
pathebrowser dep for deep server components (#30456)
🩹 Fixes
- nuxt: Update module path for defaults (#30371)
- nuxt: Ignore non-reference identifiers when extracting page metadata (#30381)
- nuxt: Pass
nuxtinstance toresolvePagesRoutes(e4a372e12) - schema: Support pfx certificate for dev server (#30412)
- nuxt: Use node
locationinstead ofrangefor route meta property extraction (#30447) - schema: Override
vueCompilerOptions.pluginstype (#30454) - nuxt: Respect
baseURLwhen ignoring prerendered manifest (#30446) - nuxt: Respect
router.optionswhen hmring routes (#30455)
💅 Refactors
- nuxt: Use
consolawithnuxttag instead of console (#30408)
📖 Documentation
- Update references to
lodashand recommendes-toolkit(8e2ca5bdc) - Add warning about prerendering (#30437)
🏡 Chore
- Add configuration for JetBrains IDEs (#30380)
- Update lockfile (db65a703b)
- Dedupe lockfile + bump nanoid (c5eb6a81d)
❤️ Contributors
- Daniel Roe (@danielroe)
- Anders Bootsmann Larsen (@bootsmann1995)
- Alexander Lichter (@TheAlexLichter)
- Matej Černý (@cernymatej)
- Connor Roberts (@murshex)
- Julien Huang (@huang-julien)
v3.15.0
👀 Highlights
❄️ Snowfall!
Happy holidays! You'll notice when you start Nuxt that (if you're in the Northern Hemisphere) there's some snow on the loading screen (#29871).
⚡️ Vite 6 included
Nuxt v3.15 includes Vite 6 for the first time. Although this is a major version, we expect that this won't be a breaking change for Nuxt users (see full migration guide). However, please take care if you have dependencies that rely on a particular Vite version.
One of the most significant changes with Vite 6 is the new Environment API, which we hope to use in conjunction with Nitro to improve the server dev environment. Watch this space!
You can read the full list of changes in the Vite 6 changelog.
🪵 Chromium devtools improvements
We talk a lot about the Nuxt DevTools, but v3.15 ships with better integration in dev mode for Chromium-based browser devtools.
We now use the Chrome DevTools extensibility API to add support for printing nuxt hook timings in the browser devtools performance panel.
🗺️ Navigation mode for callOnce
callOnce` is a built-in Nuxt composable for running code only once. For example, if the code runs on the server it won't run again on the client. But sometimes you do want code to run on _every navigation_ - just avoid the initial server/client double load. For this, there's a new mode: 'navigation'` option that will run the code only once _per navigation_. (See #30260 for more info.)
await callOnce(() => counter.value++, { mode: 'navigation' })
🥵 HMR for templates, pages + page metadata
We now implement hot module reloading for Nuxt's virtual files (like routes, plugins, generated files) as well as for the content of page metadata (within a definePageMeta macro) (#30113).
This should mean you have a faster experience in development, as well as not needing to reload the page when making changes to your routes.
📋 Page meta enhancements
We now support extracting extra page meta keys (likely used by module authors) via experimental.extraPageMetaExtractionKeys (#30015). This enables module authors to use this information at build time, in the pages:resolved hook.
We also now support local functions in definePageMeta (#30241). This means you can do something like this:
function validateIdParam(route) {
return !!(route.params.id && !isNaN(Number(route.params.id)))
}
definePageMeta({
validate: validateIdParam,
})
🔥 Performance improvements
We now preload the app manifest in the browser if it will be used when hydrating the app (#30017).
We'll also tree shake vue-router's hash mode history out of your bundle if we can - specifically, if you haven't customised your app/router.options.ts (#30297).
🐣 v4 updates
If A few more changes shipped for the new defaults for v4, including only inlining styles by default for Vue components (#30305).
✅ 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: Update dependency vite to v6 (3.x) (#30044)
- kit: Allow module default options to be async (#29980)
- nuxt: Add new types to vue preset (#29819)
- nuxt: Experimental
extraPageMetaExtractionKeys(#30015) - nuxt,schema: Allow setting serialisable vue app config (#28873)
- nuxt: Print nuxt hook timings in browser devtools (#29922)
- nuxt: Support vue directive auto-imports within unimport (#29818)
- schema: Add snow effect on loading screen in winter (#29871)
- nuxt: Support local functions in
definePageMeta(#30241) - nuxt: Add
mode: 'navigation'tocallOnce(#30260)
🔥 Performance
- nuxt: Preload app manifest (#30017)
- nuxt: Use static
hashModeoption (#30297) - vite: Use vite to clear screen (#30315)
- schema: Only inline styles for vue components (#30305)
- nuxt: Remove useId from composable key plugin (#30328)
🩹 Fixes
- nuxt: Check if nuxt link observer is null (#30038)
- nuxt: Unref the default value of asyncData when clearing (#30041)
- kit: Re-export
addServerTemplate(a02af2348) - Remove unused dependencies and tidy project (#30043)
- vite: Add back some dev-bundler dependencies (976024f16)
- nuxt: Do not persist
extraExtractionKeyson runtimeroute.meta(ae9f42f4a) - nuxt: Allow array/object
stylevalue for head components (#29999) - nuxt: Tidy up remnants of previous
useIdimplementation (40f437d25) - kit,nuxt: Provide
buildDirtonormalizeTemplate(#30115) - kit: Add better logging for non-resolved modules (#30116)
- nuxt: Correct return type of
useRequestFetch(#30117) - nuxt,vite: Hmr for templates, pages + page metadata (#30113)
- nuxt: Use
nitropackrather thannitroimport (2d5b53b23) - kit: Use resolved module paths for transpile + modulesDir (#30136)
- Update
engines.nodeto match dependencies (#30139) - schema: Allow
routerOptions.historyto return null (#30192) - nuxt: Render client page directly when not hydrating (#30061)
- nuxt: Use
useIdfor island client component teleport id (#30151) - nuxt: De-default async layout components (#30203)
- nuxt: Correct types for
nuxtandnuxt/app(#30148) - nuxt,schema: Allow showing spa loader til after hydration (#29776)
- nuxt: Remove whitespace around spa loading template (070bd103c)
- nuxt: Hoist environment types (#30230)
- schema: Hoist nitro runtime types (73761dade)
- nuxt: Ensure
getRouteRulesworks with nitro signature (#30277) - nuxt: Respect
replacein middleware withnavigateTo(#30283) - nuxt: Update import paths for
nitropack(f220314a5) - nuxt: Don't use
<RouterLink>for links starting with#(#30190) - vite: Ignore optimising
#app-manifest(ec613e533) - nuxt: Use
useIdforclient-fallbackcomponent uid (#30314) - schema: Gate inline style change behind v4 check (ceac86e34)
- nuxt: Do not resolve deep imports for
@vitest/(4171a1076) - kit: Initialize tsconfig paths in
addTemplateif undefined (#30348) - nuxt: Treat client useAsyncData calls as async boundaries (#30343)
- nuxt: Initialise
import.meta.hot.data(b1cf5781d)
💅 Refactors
- Move
composable-keysplugin into nuxt core (#30029) - nuxt: Simplify and improve core plugins that parse ast (#30088)
- nuxt: Prefix all core modules with
nuxt:(#30028)
📖 Documentation
- Remove extra new line in frontmatter (#30031)
- Text capitalization for titles (#30054)
- Mention that type checking can happen in dev (#30012)
- Fix typos in punctuation (#30006)
- Remove duplicate information about preprocessor variables (#30002)
- Format text case for consistency (#30073)
- Add a section about
event.waitUntil(#29583) - Improve wording (#30106)
- Update configuration files format (#30087)
- Update links to
vite.dev(#30111) - Fix incorrect vite docs link (#30112)
- Add note about using bun runtime (#30019)
- Add giget limitation in nuxt layers documentation (#30122)
- Correct vite link (#30135)
- Add
nuxi upgradechannel flag (#30184) - Add note about awaiting
useLazyFetch(#30171) - Add missing comma in upgrade doc code sample (#30189)
- Added options and option definitions for sourcemap (#30201)
- Add shared directory documentation (#29816)
- Document
vite.css.preprocessorMaxWorkers(eb1ba017c) - Handle zero-length string (cf74b4c98)
- Update nitro links + fix link checking (#30228)
- Add a note about
compatibilityVersionfeature flag (#30274) - Update auto-imports to advertise the scan feature (#30292)
- Update
nuxicommand pages (#30199) - Update migration documentation for
inlineStyles(2660bffbc) - Add bluesky link (#30322)
- Add recipe for session and authentication (#27287)
- Fix filename for prerendering page (#30333)
- Add spacing (#30331)
🏡 Chore
- Ignore typescript update for now (10f08011c)
- Refresh lockfile (2cdd04c62)
- Don't ignore typescript, but upgrade it separately (149477467)
- Pin
unimport(7ee455969) - Upgrade unimport separately (dcf8bda04)
- Add
installed-checkdependency (0e84cb9a4) - Remove unimport from isolation (9d7f70ec0)
- Migrate renovate config (#30214)
- Update bundle size snapshot (b88ad0765)
- Downgrade
engines.nodeto reflect only deps (d3d276919) - Remove (unused)
rimraf(cf9d82c5a) - Remove outdated comment (#30324)
- Cleanup renovate (6e682b1ff)
- Document
divwrapper in client-only page (#30359)
✅ Tests
- Add additional attw test for built packages (#30206)
- Improve assertions for spa loading tests (80bd2d2ec)
- Bump bundle size snapshot (d545f9e96)
- Try to improve spa preloader tests (08219a502)
- Ensure dev server is loaded before running tests (f66cf928e)
🤖 CI
- Ignore dev-dependencies for engines.node (e366a6feb)
- Analyse github actions with codeql (#30293)
- Exclude file that codeql cannot analyse (7e03b08a6)
❤️ Contributors
- Daniel Roe (@danielroe)
- Julien Huang (@huang-julien)
- Mehmet (@productdevbook)
- @beer (@iiio2)
- Nishant Aanjaney Jalan (@cybercoder-naj)
- David Nahodyl (@Smef)
- Vuk Marjanovic (@vmrjnvc)
- Alexander Lichter (@TheAlexLichter)
- Bobbie Goede (@BobbieGoede)
- Connor Roberts (@murshex)
- Matej Černý (@cernymatej)
- derHodrig (@derHodrig)
- Martins Zeltins (@martinszeltins)
- Matt (@matt-clegg)
- Nikolay (@RokeAlvo)
- Joaquín Sánchez (@userquin)
- bjoaquinc (@bjoaquinc)
- wzc520pyfm (@wzc520pyfm)
- Kraig Burrows (@zync09)
- Lucie (@lihbr)
- Harlan Wilton (@harlan-zw)
- 一纸忘忧 (@ikxin)
- Sébastien LeBlanc (@mrleblanc101)
- Teena (@franklin-tina)
- skmedix (@skmedix)
- Daniel Rentz (@danielrentz)
- Inesh Bose (@ineshbose)
- Felix Gabler (@felixgabler)
- Damian Głowala (@DamianGlowala)
- mianlang (@mianlang)
- Tamás H. (@Tamas-hi)
- xjccc (@xjccc)
- Guillaume Chau (@Akryum)
- Farnabaz (@farnabaz)
v3.14.1592
3.14.1592 is the next patch release.
👉 Changelog
🩹 Fixes
- rspack: Update
webpackbarwith support for rspack (#29823) - nuxt: Assign default name to component without setup (#29869)
- kit: Use
dstto deduplicate templates when adding them (#29895) - nuxt: Handle empty plugin files (d44408e87)
- vite: Use resolved nuxt template
dstto invalidate modules (6cd3352de) - nuxt: Return null map for empty plugin metadata (302a66da9)
- kit: Resolve module paths before appending subpaths (#29955)
- nuxt: Recompile templates on
changeevents (#29954) - nuxt: Do not include
<NuxtWelcome>when building (#29956) - nuxt: Allow scanning metadata from 2+ files at same path (#29969)
- nuxt: Do not disallow importing nitro dependencies (#29975)
💅 Refactors
- nuxt: Define layouts as async vue components (#29957)
📖 Documentation
- Update custom environment example (e3759ad55)
- Update minimal example (7973f5ed4)
- Add tip about islands directory (#29913)
- Fix typo in composable name (#29910)
- Rename @nuxt/auth to @nuxt/auth-utils in roadmap (#29906)
- Capitalize text (#29938)
- Improve clarity in seo meta example (#29930)
- Update getting started to include WebStorm (#29845)
🏡 Chore
- Remove unused imports and update eslint config (#29876)
✅ Tests
- Add import protection test (fbd5c33ba)
🤖 CI
- Remove release-pr workflow (2915f93c3)
❤️ Contributors
- Daniel Roe (@danielroe)
- Gustavo Aquino Torres Teixeira (@guska8)
- Stephanie Smith (@stephiescastle)
- @beer (@iiio2)
- Maxime Pauvert (@maximepvrt)
- crisarji (@crisarji)
- RBV1 (@RBV1)
- Adrien Foulon (@Tofandel)
- Julien Huang (@huang-julien)
- Horu (@HigherOrderLogic)
- Jan-Niklas W. (@niklas-wortmann)
v3.14.159
3.14.159 is a hotfix release to address regressions in v3.14.
We're leaning into the π theme - future patch releases of this minor version will just continue adding digits. (Sorry for any inconvenience! 😆)
👉 Changelog
🩹 Fixes
- nuxt: Update nitropack preset directory (#29780)
- kit: Fall back to meta version if there's no
module.json(#29793) - kit: Use
mllyto resolve module paths to avoid cjs fallback (#29799) - webpack,rspack: Add adapter for
webpack-dev-middleware(#29806) - nuxt: Remove null-byte prefix for virtual files (#29809)
- kit: Convert module path to file url before reading meta (fb833ac64)
📖 Documentation
- Capitalize titles (#29768)
- Fix rou3 link in nitro.js (#29775)
- Fix tip formatting (#29792)
- Add link to h3 blogpost (#29794)
- Remove outdated cloudflare tip (auto minify deprecated) (#29812)
🏡 Chore
- nuxt: Remove redundant type (#29810)
❤️ Contributors
- Daniel Roe (@danielroe)
- xjccc (@xjccc)
- Efraim (@EfraimGENC)
- Aurion SARL (@Aurion72)
- Erik Lilja (@Lilja)
- Markus Oberlehner (@maoberlehner)
- Lukas Bauer (@luxterful)
- @beer (@iiio2)
v3.14.0
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!)
⚡️ Faster starts powered by jiti
Loading 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. ✨
📂 Shared folder for code and types shared with client/server
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 builder
We'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.
✨ New composables
We have new useResponseHeader and useRuntimeHook composables (#27131 and #29741).
🔧 New module utilities
We now have a new addServerTemplate utility (#29320) for adding virtual files for access inside nitro runtime routes.
🚧 v4 changes
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<Header>. From v4 we ensure this is<AppHeader>, but it's opt-in to avoid breaking any manual<KeepAlive>you 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
webpackmemfs (#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
- nuxt: Use
addBuildPlugininternally (#29157) - nuxt,schema,vite,webpack: Use unplugin for vfs (#29165)
📖 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
ofetchheaders for interceptors (#29118) - Mention upgrading third-party configs (#27768)
- Improve explanation of ssr + data fetching (#29010)
- Add a description for
.env.test(#29398) - Add section on 'updateAppConfig' in the 'app.config' page (#29397)
- Add example to navigateTo util (#29611)
- Remove
mockImplementation()call (#29669) - Update lifecycle hooks (#29678)
- Type cast api plugin in custom usefetch example (#29756)
- Correct some errors about proxying headers with
$fetch(#29755) - Add information on
--envNameflag (#28909) - Add error expectation (09885b87e)
📦 Build
- ui-templates: Switch to
beasties(1b5391182)
🏡 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.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.