Instead of importing the `'nunjucks'` module, import `'templates'` (with the name `nunjucks`). The templates module loads in the extensions and makes nunjucks AMD.