-
Firstly, you must to install
nunjucks
npm install nunjucks npm install @types/nunjucks --dev
-
Well! Now you can to install
nest-nunjucks
npm install nest-nunjucks
-
Register NunjucksModule in your root module, like this:
@Module({ imports: [ NunjucksModule.forRoot({ paths: [ "./template", "./template/partials", "./template/layouts", ], options: {}, }), ], }) export class AppModule {}
Nunjucks module has 2 static methods for creating dynamic module:
forRoot
forRootAsync
- Write this documentation