Supporting SSR scenarios
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- csharp, node.js, react, typescript, vite
調査の方向性
リンクされたプロトタイプ、特にパッチが適用された init.js、NodeSsrHost.cs、vite.config.ts と、issue #440 および #330 を確認することから始めてください。想定されている貢献が、初期化済みの CLR host 向けに再利用可能な SSR サポートを提供することなのか、ビルド時の import の書き換えなのか、それともその両方なのかを明確にしてください。done は、承認された設計と動作する SSR カバレッジによって定義する必要があります。
索引モデルが issue の本文から書いたものです。
説明
One of my motivations to use this is for using my .NET server as a runtime for my React frontend. In order to do that, I need to execute SSR code through Node.js in .NET and I think the two options right now are edge-js and node-api-dotnet.
I've completed a prototype of supporting React Router SSR with node-api-dotnet here:
https://github.com/kamranayub/dotnet-ssr
However, I did run into a few issues:
- Debugging doesn't work, since it's targeting
net8.0and there's an issue with that #440 - You can't use the
node-api-dotnetnpm package vanilla within SSR context because the CLR host is already initialized #330
For the second issue, I've worked around it by patching the init.js manually and injecting a dotnetHost global, which works!
I think this could be contributed back to the library, but not sure where/how to do that. I'm up for it if that would be accepted, I just need some guidance.
I haven't yet prototyped this with edge-js, I only know it also does in-proc communication -- what I don't know is if I can set it up like this so the SSR code can invoke .NET APIs, plus I love that this generates the typedefs which make this work great under Vite dev mode 🚀
To get that working, you need to rewrite the import paths at build time:
- 主要言語
- C#
- スター
- 783
- フォーク
- 80
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/node-api-dotnet のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/node-api-dotnet#484 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/node-api-dotnet#481 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoft/node-api-dotnet#486 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoft/node-api-dotnet#483 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
microsoft/node-api-dotnet#479 ·
microsoft/node-api-dotnet の issue をすべて見る
似ている issue
-
.NET bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
RayWangQvQ/BiliBiliToolPro#1144 ·
メンテナーはふだん 1 日以内に返信
-
area-System.Numerics.Tensors untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dotnet/runtime#134691 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
microsoft/DataFactory.MCP#121 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
unoplatform/uno.templates#2277 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/fluentui-blazor#5344 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信