heiss使用本机ES6模块实现热模块重载原型

嘿,给你推荐一个挺有意思的工具——heiss。它是一个轻量级的静态服务器,可以通过本地的ES2015 模块实现热模块替换。说实话,它还处于原型阶段,但作为一个实验和原型开发的工具,已经蛮有意思了。你可以用它来快速试验各种想法。需要注意的是,它在某些情况下无法热重载模块,比如当导出名称或数量发生变化时。heiss还要求 Node.js 8 或更高版本,客户端则需要支持import.meta的浏览器。哦,启动命令也简单,只需要输入heiss就能启动静态服务器,支持热重载任何.js 或者.mjs 文件。不过嘛,记得查看下限制,避免踩坑哦!

如果你正在寻找一个可以快速体验本地模块热重载的工具,heiss不失为一个不错的选择。如果你对热重载有需求,还可以参考下webpack的热模块重载开发服务器,或者更高效的工具。

zip
heiss-master.zip 预估大小:62个文件
folder
heiss-master 文件夹
file
.travis.yml 103B
folder
bin 文件夹
file
heiss 49B
folder
example 文件夹
file
createText.mjs 310B
file
index.html 133B
file
text.mjs 37B
file
index.mjs 181B
file
package.json 3KB
file
tslint.json 358B
folder
test 文件夹
folder
client 文件夹
file
HotModule.test.ts 3KB
file
ModuleRegistry.test.ts 5KB
folder
server 文件夹
file
generateHmrProxy.test.ts 780B
folder
__snapshots__ 文件夹
file
generateHmrProxy.test.ts.snap 10KB
folder
fixtures 文件夹
folder
generateHmrProxy 文件夹
file
mutable-destructuring.mjs 72B
file
multiple-named-exports.mjs 59B
file
named-multiple-var-declarations.mjs 42B
file
default-export-conflict.mjs 58B
file
named-class-export.js 18B
file
named-function-declaration.mjs 23B
file
named-export-alias.mjs 32B
file
import-meta.mjs 17B
file
named-single-export.mjs 27B
file
mutable-binding-let.mjs 18B
file
imports-only.mjs 63B
file
dynamic-imports.mjs 30B
file
destructuring-array-rest.mjs 36B
file
default-export.mjs 31B
file
mutable-binding-var.mjs 18B
file
named-conflicts.mjs 56B
file
named-single-var-declaration.mjs 20B
file
mutable-named-export.mjs 25B
file
registry-named-export.mjs 28B
file
destructuring-object-default.mjs 37B
file
destructuring-object-aliases.mjs 52B
file
destructuring-nested.mjs 110B
file
imports.mjs 78B
file
destructuring-array.mjs 30B
file
no-exports.mjs 13B
file
destructuring-object.mjs 36B
file
tsconfig.json 215B
file
.prettierrc 371B
file
LICENSE 1KB
file
package-lock.json 282KB
folder
src 文件夹
folder
client 文件夹
file
HotModule.ts 2KB
file
templateOptions.d.ts 41B
file
tsconfig.json 306B
file
ModuleRegistry.ts 4KB
file
api.ts 2KB
folder
server 文件夹
file
hmrEntryMiddleware.ts 710B
file
server.ts 3KB
file
parseModule.ts 495B
file
tsconfig.json 249B
file
cli.ts 923B
file
generateHmrProxy.ts 8KB
file
message.ts 152B
file
generateProxyMiddleware.ts 1KB
file
tsconfig.json 138B
file
tsconfig.base.json 203B
file
.gitignore 28B
folder
typings 文件夹
file
modules.d.ts 93B
file
CHANGELOG.md 1KB
file
commitlint.config.js 71B
file
README.md 3KB
...
zip 文件大小:92.27KB