惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
K
Kaspersky official blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog
aimingoo的专栏
aimingoo的专栏
M
MIT News - Artificial intelligence
小众软件
小众软件
云风的 BLOG
云风的 BLOG
腾讯CDC
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
Stack Overflow Blog
Stack Overflow Blog
量子位
S
Secure Thoughts
G
GRAHAM CLULEY
C
CXSECURITY Database RSS Feed - CXSecurity.com
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
T
Threat Research - Cisco Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
G
Google Developers Blog
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
C
Cisco Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - 聂微东
宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Forbes - Security
Forbes - Security
Engineering at Meta
Engineering at Meta
S
Security Affairs
Help Net Security
Help Net Security
博客园 - 三生石上(FineUI控件)
AWS News Blog
AWS News Blog
博客园 - 叶小钗
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
Project Zero
Project Zero
H
Heimdal Security Blog
W
WeLiveSecurity
C
Check Point Blog

The Nuxt Blog

Meet Nuxi · Nuxt Blog Introducing the Nuxt Agent · Nuxt Blog Nuxt 4.4 · Nuxt Blog Nuxt 4.3 · Nuxt Blog Building an MCP Server for Nuxt · Nuxt Blog Nuxt Image v2 · Nuxt Blog Nuxt 4.2 · Nuxt Blog Nuxt UI v4 · Nuxt Blog Nuxt 4.1 · Nuxt Blog Nuxt 3.18 · Nuxt Blog Announcing Nuxt 4.0 · Nuxt Blog Building a Privacy-First Feedback Widget · Nuxt Blog Roadmap to v4 · Nuxt Blog Nuxt 3.17 · Nuxt Blog Nuxt UI v3 · Nuxt Blog Nuxt 3.16 · Nuxt Blog Nuxt 3.15 · Nuxt Blog Introducing Nuxt Icon v1 · Nuxt Blog Nuxt 3.14 · Nuxt Blog Nuxt 3.13 · Nuxt Blog Introducing Nuxt Scripts · Nuxt Blog Nuxt 2 End-of-Life (EOL) · Nuxt Blog Nuxt 3.12 · Nuxt Blog Refreshed Nuxt ESLint Integrations · Nuxt Blog Nuxt: Looking forward · Nuxt Blog Nuxt 3.11 · Nuxt Blog The Evolution of Shiki v1.0 · Nuxt Blog Nuxt 3.10 · Nuxt Blog Nuxt 3.9 · Nuxt Blog Nuxt DevTools v1.0 · Nuxt Blog A New Website · Nuxt Blog Nuxt 3.7 · Nuxt Blog Nuxt on the Edge · Nuxt Blog Nuxt 3.6 · Nuxt Blog Nuxt 3.5 · Nuxt Blog Nuxt 3.4 · Nuxt Blog Introducing Nuxt DevTools · Nuxt Blog Nuxt 3.3 · Nuxt Blog Nuxt: A vision for 2023 · Nuxt Blog Announcing 3.0 · Nuxt Blog Announcing Nuxt 3 Release Candidate · Nuxt Blog Introducing Nuxt 3 Beta · Nuxt Blog Nuxt 2 Static Improvements · Nuxt Blog Going Full Static · Nuxt Blog Understanding how fetch works in Nuxt 2.12 · Nuxt Blog Nuxt 2: From Terminal to Browser · Nuxt Blog Introducing Smart Prefetching · Nuxt Blog Navigation · Nuxt Blog
Nuxt 3.8 · Nuxt Blog
2023-10-19 · via The Nuxt Blog

💻 CLI Improvements

Just to remind you, we're now using the new Nuxt CLI which is now versioned separately.

You can now install a module with nuxi module add <module-name>

We now share the same port with the Vite websocket, meaning better support for docker containers in development.

Read the Nuxt CLI v3.9.0 release notes.

✨ Built-in Nuxt DevTools

Nuxt DevTools v1.0.0 is out and we now think it's ready to be shipped as a direct dependency of Nuxt.

Check out Nuxt DevTools v1.0 announcement.

📸 Nuxt Image Auto-install

<NuxtImg> and <NuxtPicture> first-class built-in components.

We now auto-installing @nuxt/image the first time that they are used (#23717).

We advise using @nuxt/image if you're using images in your site; it can apply optimisations to make your site more performant.

📂 Deeper Layout Scanning

This is a behaviour change so do take care with this one.

We now support scanning layouts within subfolders in ~/layouts in the same way as we do with ~/components.

FileLayout name
~/layouts/desktop/default.vue'desktop-default'
~/layouts/desktop-base/base.vue'desktop-base'
~/layouts/desktop/index.vue'desktop'

Read more about Named Layouts.

📊 App Manifest

We now support a built-in app manifest (see PR #21641), which generates a manifest at /_nuxt/builds/meta/<buildId>.json.

It enables loading payloads only for prerendered routes, if a site is generated with nuxt generate, preventing 404s in the console.

It also enables client-side route rules. Only redirect route rules is supported for now; they will now redirect when performing client-side navigation.

export default defineNuxtConfig({
  routeRules: {
    '/about': { redirect: '/about-us' }
  }
})

The app manifest also enables future enhancements including detection of a new deployment by checking /_nuxt/builds/latest.json.

You can opt-on from this behaviour if you need to by setting experimental.appManifest to false in your nuxt.config.ts file.

🤝 Scope and Context Improvements

We now define a 'scope' for Nuxt composables executed in plugins (#23667), which allows running synchronous cleanup before navigating away from your site, using the Vue onScopeDispose lifecycle method.

This should fix an edge case with cookies (#23697) and also improves memory management such as Pinia stores (#23650).

Read more about Vue effect scopes.

We also now support native async context for the Vue composition API (#23526). In case you're unaware, we support native async context on Node and Bun, enabled with experimental.asyncContext.

If you experience issues with Nuxt instance unavailable, enabling this option may solve your issues:

nuxt.config.ts

export default defineNuxtConfig({
  experimental: {
    asyncContext: true
  }
})

Once we have cross-runtime support, we will enable it by default.

You can define your own <NuxtLink> components with the defineNuxtLink utility.

Today, you can cutomize the options for the built-in <NuxtLink>, directly in your nuxt.config.ts file (#23724).

This can enable you to enforce trailing slash behaviour across your entire site, for example:

nuxt.config.ts

export default defineNuxtConfig({
  experimental: {
    defaults: {
      nuxtLink: {
        activeClass: 'nuxt-link-active',
        trailingSlash: 'append'
      }
    }
  }
})

⚡️ Data Fetching Improvements

We have two very significant new features for useAsyncData and useFetch:

  1. You can now set deep: false to prevent deep reactivity on the data object returned from these composables (#23600). It should be a performance improvement if you are returning large arrays or objects. The object will still update when refetched; it just won't trigger reactive effects if you change a property deep within the data.
  2. You can now use the getCachedData option to handle custom caching for these composables (#20747)

pages/index.vue

<script setup>
const nuxtApp = useNuxtApp()
const { data } = await useAsyncData(() => { /* fetcher */ }, {
  // this will not refetch if the key exists in the payload
  getCachedData: key => nuxtApp.payload.static[key] ?? nuxtApp.payload.data[key]
})
</script>

We also support configuring some default values for these composables in an app-wide way (#23725):

nuxt.config.ts

export default defineNuxtConfig({
  experimental: {
    defaults: {
      useAsyncData: {
        deep: false
      },
      useFetch: {
        retry: false,
        retryDelay: 100,
        retryStatusCodes: [500],
        timeout: 100
      }
    }
  }
})

🔢 Layer Improvements

We now more carefully load layer plugins (#22889 and #23148) and middleware (#22925 and #23552) in the order of the layers, always loading your own plugins and middleware last. This should mean you can rely on utilities that layers may inject.

And probably one of the most significant changes - if you are using remote layers we now clone these within your node_modules/ folder (#109) so layers can use dependencies with your project. See c12 release notes for full details.

We've also added a test suite to cover these layer resolution changes.

😴 Nightly Release Channel

Every commit to the main branch of Nuxt is automatically deployed to a new release, for easier testing before releases. We've renamed this from the 'edge release channel' to the 'nightly release channel' to avoid confusion with edge deployments. And probably also with Microsoft Edge (though I haven't heard that anyone was confused with that one!)

  • nuxt3 is now nuxt-nightly
  • nuxi-edge is now nuxi-nightly
  • @​nuxt/kit-edge is now @​nuxt/kit-nightly
  • ... and so on.

Read more about the Nighly Release Channel.

⚗️ Nitro v2.7

Nitro v2.7 has been released with lots of improvements and bug fixes.

🔥 One of the most significant is that we now save 40% of bundle size in production by using native fetch supported in Node 18+ (#1724). So if possible, we'd recommend you update your Node version to at least 18.

Check out Nitro v2.7 release note.

💪 Type Import Changes

This is likely to need code changes in your project.

Vue requires that type imports be explicit (so that the Vue compiler can correctly optimise and resolve type imports for props and so on). See core Vue tsconfig.json.

We've therefore taken the decision to turn on verbatimModuleSyntax by default in Nuxt projects, which will throw a type error if types are imported without an explicit type import. To resolve it you will need to update your imports:

- import { someFunction, SomeOptions } from 'some-library'
+ import { someFunction } from 'some-library'
+ import type { SomeOptions } from 'some-library'

You may also encounter modules in the Nuxt ecosystem that need to be updated; please open an issue for those modules. I'm also very happy to help if you're encountering any problems with this, if you're a module author. Just tag me and I'll take a look.

If for whatever reason you need to undo this change in your project you can set the following configuration:

nuxt.config.ts

export default defineNuxtConfig({
  typescript: {
    tsConfig: {
      compilerOptions: {
        verbatimModuleSyntax: false
      }
    }
  }
})

However, we'd recommend only doing that temporarily, as Vue does need this option to be set for best results.

✅ Upgrading

As usual, our recommendation for upgrading is to run:

Full Release Notes

Read the full release notes of Nuxt v3.8.0.

Thank you for reading this far! We hope you enjoy the new release. Please do let us know if you have any feedback or issues.

Happy Nuxting ✨