alloc / alloc/saus

Faster reloading of isolated modules

未關閉
#65 2 則留言 0 個 reaction 已指派 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 摘要。