所以我在Vision文档和插件example中尝试了Nunjucks nunjucks-hapi并获得了相同的结果 - watch无效。
var viewPath = Path.join(__dirname, 'views')
var env = NunjucksHapi.configure(viewPath, { watch: true})
server.register(plugins, (err) => {
if (err) throw err;
server.views({
engines: {
html: NunjucksHapi
},
path: viewPath
});
server.route(...);
server.start((err) => {
});
});
的软件包:
"hapi": "^13.0.0",
"nunjucks": "^2.3.0",
"nunjucks-hapi": "^2.0.1",
"vision": "^4.0.1"
关于在哪里寻找问题的建议?