alloc / alloc/saus

Faster reloading of isolated modules

オープン
#65 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
proposal runtime
主要言語
TypeScript
スター
38
フォーク
1
PR マージ指標
30日以内にマージされた PR はありません

説明

Currently, all isolated modules are reloaded between page requests. Additionally, this reloading does not take place until the next request comes in.

- We should reload eagerly (after each request, instead of before)
- We should reload only the modules that are stateful
- We need to build a module graph (really just the importers of each module) so we can reload selectively

The first solution that comes to mind is `import.meta.hot` (Vite's HMR API). This is a flexible solution, as the user (and even plugins) can control *how* a module is reloaded, instead of only switching reload on/off. But it's also more verbose than, say, adding `/* @hot */` at the top of the module, or managing a list of stateful modules from your Saus config (which I'd like to avoid, since the list can get out of sync).

I don't think we'll need to implement the entirety of Vite's HMR API. Just the basics for now.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。