{"id":15018087,"url":"https://github.com/itgalaxy/nunjucks-webpack-plugin","last_synced_at":"2025-10-23T15:30:56.105Z","repository":{"id":48656890,"uuid":"87427933","full_name":"itgalaxy/nunjucks-webpack-plugin","owner":"itgalaxy","description":"A webpack plugin for nunjucks.","archived":false,"fork":false,"pushed_at":"2021-07-15T14:12:09.000Z","size":306,"stargazers_count":27,"open_issues_count":6,"forks_count":12,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-29T21:10:17.991Z","etag":null,"topics":["nunjucks","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":null,"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/itgalaxy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-04-06T12:40:05.000Z","updated_at":"2022-06-19T16:22:13.000Z","dependencies_parsed_at":"2022-09-06T20:51:10.947Z","dependency_job_id":null,"html_url":"https://github.com/itgalaxy/nunjucks-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itgalaxy%2Fnunjucks-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itgalaxy%2Fnunjucks-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itgalaxy%2Fnunjucks-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itgalaxy%2Fnunjucks-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itgalaxy","download_url":"https://codeload.github.com/itgalaxy/nunjucks-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237843935,"owners_count":19375230,"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","webpack","webpack-plugin"],"created_at":"2024-09-24T19:51:26.082Z","updated_at":"2025-10-23T15:30:50.772Z","avatar_url":"https://github.com/itgalaxy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nunjucks-webpack-plugin\n\n[![NPM version](https://img.shields.io/npm/v/nunjucks-webpack-plugin.svg)](https://www.npmjs.org/package/nunjucks-webpack-plugin)\n[![Travis Build Status](https://img.shields.io/travis/itgalaxy/nunjucks-webpack-plugin/master.svg?label=build)](https://travis-ci.org/itgalaxy/nunjucks-webpack-plugin)\n[![devDependencies Status](https://david-dm.org/itgalaxy/nunjucks-webpack-plugin/dev-status.svg)](https://david-dm.org/itgalaxy/nunjucks-webpack-plugin?type=dev)\n[![peerDependencies Status](https://david-dm.org/itgalaxy/nunjucks-webpack-plugin/peer-status.svg)](https://david-dm.org/itgalaxy/nunjucks-webpack-plugin?type=peer)\n[![Greenkeeper badge](https://badges.greenkeeper.io/itgalaxy/nunjucks-webpack-plugin.svg)](https://greenkeeper.io)\n\nA webpack plugin for nunjucks.\n\n## Install\n\n```shell\nnpm install --save-dev nunjucks-webpack-plugin\n```\n\n## Usage\n\n```js\nimport NunjucksWebpackPlugin from \"nunjucks-webpack-plugin\";\n\nexport default {\n  plugins: [\n    new NunjucksWebpackPlugin({\n      templates: [\n        {\n          from: \"/path/to/template.njk\",\n          to: \"template.html\"\n        }\n      ]\n    })\n  ]\n};\n```\n\nIt is possible to use multiple templates:\n\n```js\nimport NunjucksWebpackPlugin from \"nunjucks-webpack-plugin\";\n\nexport default {\n  plugins: [\n    new NunjucksWebpackPlugin({\n      templates: [\n        {\n          from: \"/path/to/template.njk\",\n          to: \"template.html\"\n        },\n        {\n          from: \"/path/to/next-template.njk\",\n          to: \"next-template.html\"\n        }\n      ]\n    })\n  ]\n};\n```\n\n## Options\n\n* `templates` - (require) `array` list of templates.\n\n  * `from` - (require) `string` path to template.\n\n  * `to` - (require) `string` destination path include filename and extension\n    (relative `output` webpack option).\n\n  * `context` - (optional) instead global `context` (see above), see\n    [render](https://mozilla.github.io/nunjucks/api.html#render) second\n    argument. The following webpack compilation variables are also sent\n    through to the template under the `__webpack__` object:\n\n    * hash\n\n  * `callback` - (optional) instead global `callback` (see above), see\n    [render](https://mozilla.github.io/nunjucks/api.html#render) third argument.\n\n  * `writeToFileEmit` - (optional, default: false) - If set to `true` will emit\n    to build folder and memory in combination with `webpack-dev-server`\n\n* `configure` - (optional) `object` or `nunjucks.Environment` see\n  [configure](https://mozilla.github.io/nunjucks/api.html#configure) options.\n\n## Contribution\n\nFeel free to push your code if you agree with publishing under the MIT license.\n\n## [Changelog](CHANGELOG.md)\n\n## [License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitgalaxy%2Fnunjucks-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitgalaxy%2Fnunjucks-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitgalaxy%2Fnunjucks-webpack-plugin/lists"}