Babel 7.18.0 发布、MDX 2.0 发布 | 淘系前端架构周刊 220214 期

1,746

🗞 News

Babel 7.17.0 发布

本次更新带来了一项最重磅的特性:装饰器。

随着装饰器提案从 Stage 1 到 Stage 2,即将进入 Stage 3,Babel 的此次更新就带来了这项重磅特性。

Release Blog:7.17.0 Released: RegExp 'v' mode and ... 🥁 decorators! · Babel (babeljs.io)

MDX 2.0 发布

本次更新带来了以下内容:

  • 改进了语法,在 JSX 里写 Markdown 更加轻松
  • 支持 JavaScript 表达式,{2 * Math.PI} 会被转换为 6.283185307179586
  • 新的 esbuild、Rollup 和 Node.js 集成
  • 支持任意 JSX 运行时,React、Preact、Vue、Emotion 等你能叫出名字的都支持
  • 改进了 AST,能够提供更多详细信息
  • 编译速度提升 25%
  • 构建产物运行速度提升 100%
  • @mdx-js/mdx Bundle 大小减小 250%
  • &etc.

Release Blog:MDX 2 | MDX (mdxjs.com)

📦 Open Source

Perseus

一个基于 Rust 且支持 SSR 和 SSG 的高级 Web 开发框架。

  • 📕 Supports static generation (serving only static resources)
  • 🗼 Supports server-side rendering (serving dynamic resources)
  • 🔧 Supports revalidation after time and/or with custom logic (updating rendered pages)
  • 🛠️ Supports incremental regeneration (build on demand)
  • 🏭 Open build matrix (use any rendering strategy with anything else)
  • 🖥️ CLI harness that lets you build apps with ease and confidence
  • 🌐 Full i18n support out-of-the-box with Fluent
  • 🏎 Lighthouse scores of 100 on desktop and over 95 on mobile
  • ⚡ Support for hot state reloading (reload your entire app's state after you make any code changes in development, Perseus is the only framework in the world that can do this, to our knowledge)

GitHub Repo:arctic-hen7/perseus: A high-level web development framework for Rust with full support for server-side rendering and static generation. (github.com)

Rolldown

Rollup 的 Rust 实现,完全兼容 Rollup API(开发中)。

GitHub Repo:rolldown-rs/rolldown: Rollup Rust implementation with 100% API compatible (github.com)

📑 Article

TypeScript 中的类型控制流分析演进

原文链接:TypeScript 中的类型控制流分析演进 - 知乎 (zhihu.com)

Chrome 98 - What’s New in DevTools

视频链接:Chrome 98 - What’s New in DevTools - YouTube

使用 Performance 看看浏览器在做些什么

原文链接:使用 Performance 看看浏览器在做些什么 (qq.com)

On Porting the TypeScript Compiler to Go (vs Rust)

原文链接:On Porting the TypeScript Compiler to Go (vs Rust)