我正在使用'deno'和'oak'。为了自动刷新,我使用的是“ denon”,它类似于nodejs中的“ nodemon”。作为模板引擎,第三方模块,我正在使用-'denjucks'。每当我更改模板代码并保存时,服务器不会自动重新启动。如何解决这个问题?
答案 0 :(得分:0)
您可以使用exts
选项并添加html
。
{
"scripts": { /* */ },
"watcher": {
// The number of milliseconds after the last change.
"interval": 350,
// The file extensions that it will scan for.
"exts": ["js", "ts", "json", "html"],
// The globs that it will scan for.
"match": ["*.*"],
// The globs that it will not scan for.
"skip": ["*/.git/*"],
// Use the legacy file monitoring algorithm. (walking)
"legacy": false
}
}
答案 1 :(得分:-1)
解决了该问题。在denon.json文件中添加以下内容-
"watcher": {
"exts": ["js", "ts", "json", "html"]
}
这会将html文件添加到观察者列表中。