{"id":15018102,"url":"https://github.com/ibesty/nunjucks-webpack-loader","last_synced_at":"2025-10-23T15:31:28.945Z","repository":{"id":53065970,"uuid":"153738374","full_name":"ibesty/nunjucks-webpack-loader","owner":"ibesty","description":"Nunjucks loader for webpack, support include, extends and Customizing Syntax.","archived":false,"fork":false,"pushed_at":"2023-01-04T16:41:00.000Z","size":259,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T14:04:05.898Z","etag":null,"topics":["nunjucks-loader","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibesty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-19T06:46:08.000Z","updated_at":"2021-04-08T09:33:39.000Z","dependencies_parsed_at":"2023-02-02T18:47:31.665Z","dependency_job_id":null,"html_url":"https://github.com/ibesty/nunjucks-webpack-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibesty%2Fnunjucks-webpack-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibesty%2Fnunjucks-webpack-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibesty%2Fnunjucks-webpack-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibesty%2Fnunjucks-webpack-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibesty","download_url":"https://codeload.github.com/ibesty/nunjucks-webpack-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236406095,"owners_count":19143667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nunjucks-loader","webpack"],"created_at":"2024-09-24T19:51:27.233Z","updated_at":"2025-10-23T15:31:28.627Z","avatar_url":"https://github.com/ibesty.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nunjucks-webpack-loader\n[![NPM version][npm-image]][npm-url]\n\nNunjucks loader for webpack, support `include`, `extends` and `Customizing Syntax`.\n\n[Features](#features) | [Installation](#installation) | [Usage](#usage) | [Examples](#examples) | [Command-line options](#options) | [Configuration](#configuration)\n\n\n## Features\n\n - **Load nunjucks template file in webpack:** You can use it with html-webpack-loader.\n\n - **Support `include` and `extends`:** Use `include` and `extends` with folder alias in file.\n\n - **Customizing Syntax:** If you want different tokens than {{ and the rest for variables, blocks, and comments, you can specify different tokens as the tags option.\n## Installation\n\n```bash\n$ npm i nunjucks-webpack-loader\n```\n\n## Usage\nIn your webpack.config.js and add to rules block:\n```js\n    {\n        test: /\\.njk|nunjucks/,\n        use: ['html-withimg-loader', { // use html-loader or html-withimg-loader to handle inline resource\n                loader: 'nunjucks-webpack-loader', // add nunjucks-webpack-loader\n                options : {\n                    alias: { // add alias and you can use it in your template\n                        pages : path.resolve(__dirname, '../src/pages'),\n                        components: path.resolve(__dirname, '../src/components'),\n                        layouts: path.resolve(__dirname, '../src/layouts')\n                    },\n                    tags: { // if you want to use different tokens\n                        blockStart: '@{%',\n                        blockEnd: '%}',\n                        variableStart: '@{{',\n                        variableEnd: '}}',\n                        commentStart: '{#',\n                        commentEnd: '#}'\n                    }\n                }\n        }]\n    },\n```\n\n## In template file\n\n```twig\n{% include '~pages/sometemplate.njk' %} // ~pages is alias to pages folder\n```\n\n## Authors\n\n[Bestie](https://github.com/ibesty)\n\n## License\n\n[MIT](https://tldrlegal.com/license/mit-license)\n\n[npm-image]: https://img.shields.io/npm/v//nunjucks-webpack-loader.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/nunjucks-webpack-loader","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibesty%2Fnunjucks-webpack-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibesty%2Fnunjucks-webpack-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibesty%2Fnunjucks-webpack-loader/lists"}