本文是 Vue 团队对 Escape 一篇关于从 Vue 2 迁移到 Svelte 的博客文章的回应,纠正了 Escape 在比较中关于类型支持、TypeScript 枚举、错误边界和元框架能力方面的几处不准确之处。作者认为 Svelte 在性能和包体积方面的优势并非必然,而是取决于应用的规模和实现方式;他们提醒不要将 State of JS 调查的满意度评分作为迁移的理由,并讨论了 Svelte 基于编译器的响应式机制与 Vue 显式组合式 API 之间的权衡。文章最后表达了对 Svelte 的尊重,建议团队在进行大规模迁移之前仔细权衡实际成本与收益,并指出 Vue 2 在生命周期结束后将提供付费的延长支持服务。
Recently, folks at Escape shared a blog post talking about their migration from Vue 2 to Svelte, and compared Vue 3 with Svelte. We found that the article contained a number of inaccuracies. In this post, we will share some thoughts from our perspective and hope to clarify the potential misconceptions the post could give rise to.
Before we dive into the details, we would like to emphasize that we respect developers' choice of technology and believe that you should use what makes you more productive. We also have immense respect for the Svelte team, especially for their pursuit of simplicity and conciseness in API design.
Clarification Points
继续阅读全文
为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。
AI 摘要Vue 3.5, codenamed "Tengen Toppa Gurren Lagann," has been released as a minor update with no breaking changes. Key highlights include major reactivity system optimizations (up to 56% memory reduction and faster tracking for large reactive arrays), stabilization of Reactive Props Destructure, and SSR improvements such as lazy hydration, useId(), and data-allow-mismatch. The release also adds new features including useTemplateRef(), Deferred Teleport, onWatcherCleanup(), and various custom element enhancements.
AI 摘要VitePress 1.0 has been released—a static site generator built on Vite and Vue that serves as the modern successor to VuePress, converting Markdown content into themed static HTML pages. It is well-suited for technical documentation (powering docs for Vite, Rollup, Pinia, and the official Vue.js docs) as well as fully customizable blogs, portfolios, and marketing sites. The tool offers strong performance by serving pre-rendered HTML for fast initial loads and optimal SEO, then switching to a single-page application model for near-instant subsequent navigation and interactivity.
AI 摘要Vue 3.4 'Slam Dunk' has been released, featuring a completely rewritten template parser that is twice as fast and a refactored reactivity system that makes effect triggering more accurate and efficient. The release also stabilizes the defineModel macro, introduces a same-name shorthand for v-bind, and improves hydration mismatch error messages. Additionally, several deprecated features have been removed, including the global JSX namespace and the experimental Reactivity Transform.
AI 摘要Vue 2 will reach End of Life on December 31, 2023, after which it will no longer receive new features, updates, or fixes, though it will remain available through existing distribution channels. The Vue team is shifting its full focus to Vue 3, which offers better performance, enhanced TypeScript support, a Proxy-based reactivity system, and new built-in components. Users still on Vue 2 can update to the final release (2.7.16), purchase extended support through HeroDevs' Never-Ending Support offering, or communicate their post-EOL security plans to stakeholders.