Skip to content
项目

关于

用于 React Server Components 的极简打包器和库。

网站与应用开发

这些数字如何统计

可以做什么

  • React server components
  • Server-side rendering
  • Client components, lazily loaded as separate chunks
  • passed as props from the server to the client

实测星标增长

24小时
0
7天
0
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

MFNG

⚗️ A Minimal React Server Components Bundler & Library

Packages

MFNG offers two packages that together enable the building of a production-ready RSC app.

@mfng/core

This package contains the essential building blocks required on both the server and the client to create a streaming, server-side rendered, and properly hydrated RSC app. It also provides utilities that are needed for server-centric, client-side navigation.

↪ Documentation

@mfng/webpack-rsc

This package provides a set of Webpack loaders and plugins required for building an RSC application bundle for the browser, as well as for the server. The server bundle can be deployed to any serverless, edge, or Node.js-based environment. @mfng/webpack-rsc can be used standalone as an RSC bundling solution or in conjunction with @mfng/core.

↪ Documentation

Features

  • React server components
  • Server-side rendering
  • Client components, lazily loaded as separate chunks
  • Server actions
    • passed as props from the server to the client
    • imported from the client
    • top-level functions/closures with inline 'use server' directive
    • auto-binding of closed-over variables (not planned)
  • Progressively enhanced form actions
  • Suspensy routing
  • Production builds
  • Development server
  • Serverless deployment examples
  • Support for poisoned imports
  • Support for the Vercel AI SDK
  • Partial prerendering
  • Advanced routing

Name Origin

The name MFNG stands for "Microfrontends Next Generation". The project was originally motivated by the following questions:

Do we still need to deploy microfrontends and their APIs (also known as BFFs – Backends for Frontends) independently of the main app? Or can we integrate them at build-time, though dynamically composed at run-time, and allow them to use server components to fetch their data on the server?

It has since evolved into a general-purpose RSC library, not specifically targeted at the microfrontends use case... until we explore some form of federation integration, as pioneered by federated-rsc, perhaps.

探索相关项目

加载中…