egg: Can't find viewEngine for /.../app/view/index.tpl
- Node Version: 7.6.0
- Egg Version: 1.0.0-rc.1
- Plugin Name: egg-view-nunjucks
- Plugin Version: 2.0.0
- Platform: macOS 10.12.3
My configs
// {app_root}/config/plugin.js
exports.nunjucks = {
enable: true,
package: 'egg-view-nunjucks',
};
exports.view = {
defaultViewEngine: 'nunjucks',
mapping: {
'.tpl': 'nunjucks',
},
};
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (15 by maintainers)
Commits related to this issue
- docs: improve document for setting Ref https://github.com/eggjs/egg/issues/455#issuecomment-282931508 — committed to eggjs/egg-view-nunjucks by popomore 7 years ago
- docs: improve document for setting (#13) Ref https://github.com/eggjs/egg/issues/455#issuecomment-282931508 — committed to eggjs/egg-view-nunjucks by popomore 7 years ago
这样写就好了
写错配置…
@johnnychen 不是看这个 key, 这个是
plugins.nunjucks, 要看config.view和config.nunjucks