ice icon indicating copy to clipboard operation
ice copied to clipboard

feat: rsc to ssr

Open chenjun1011 opened this issue 2 years ago • 1 comments

实现思路

  1. 使用 react-server-dom-webpack/server.edge 渲染出 RSC 产物(只渲染 Server Component)
  2. 使用 react-server-dom-webpack/client.edge 加载 RSC 产物(这里需要在 Server 端加载 Client Component,并进行渲染)
  3. 使用 react-dom/server.edge 渲染出完整首屏 HTML

chenjun1011 avatar Dec 06 '23 08:12 chenjun1011

Codecov Report

Attention: 114 lines in your changes are missing coverage. Please review.

Comparison is base (c1deba8) 77.93% compared to head (2701ccf) 77.58%.

Files Patch % Lines
packages/ice/src/esbuild/rscLoader.ts 20.31% 51 Missing :warning:
packages/ice/src/esbuild/transfromRSCDirective.ts 24.13% 22 Missing :warning:
packages/ice/src/esbuild/assets.ts 30.00% 14 Missing :warning:
packages/ice/src/webpack/FlightManifestPlugin.ts 23.07% 10 Missing :warning:
packages/ice/src/service/serverCompiler.ts 33.33% 8 Missing :warning:
packages/ice/src/webpack/ServerCompilerPlugin.ts 0.00% 6 Missing :warning:
packages/runtime/src/runRSCClientApp.tsx 0.00% 2 Missing :warning:
packages/ice/src/esbuild/transformPipe.ts 87.50% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##           feat-rsc    #6682      +/-   ##
============================================
- Coverage     77.93%   77.58%   -0.36%     
============================================
  Files           223      225       +2     
  Lines         19668    19782     +114     
  Branches       2461     2466       +5     
============================================
+ Hits          15329    15348      +19     
- Misses         4307     4402      +95     
  Partials         32       32              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Dec 07 '23 09:12 codecov-commenter