首页 > 解决方案 > 除非重新启动服务器,否则 Denjucks 模板中的更改不会反映在刷新上

问题描述

我正在使用“deno”和“oak”。对于自动刷新,我使用的是类似于 nodejs 中的“nodemon”的“denon”。作为模板引擎,第三方模块,我正在使用 - 'denjucks'。每当我对模板代码进行任何更改并保存时,服务器都不会自动重新启动。如何解决这个问题?

标签: denooak

解决方案


您可以使用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
  }
}

推荐阅读