{"library":"nunjucks-webpack-plugin","title":"nunjucks-webpack-plugin","description":"A webpack plugin that compiles Nunjucks templates at build time. Version 5.0.0 (2018-11-12) supports webpack 2, 3, and 4, and drops Node.js 4. It renders .njk files with optional per-template context and writes outputs as webpack assets. Key differentiator: exposes webpack compilation hash (e.g., for cache busting) via __webpack__.hash in templates. Uses nunjucks ^3.0.0 as a peer dependency. Release cadence is low—last release was 2018; development appears inactive.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install nunjucks-webpack-plugin"],"cli":null},"imports":["import NunjucksWebpackPlugin from 'nunjucks-webpack-plugin';","const NunjucksWebpackPlugin = require('nunjucks-webpack-plugin').default;"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import NunjucksWebpackPlugin from 'nunjucks-webpack-plugin';\n\nexport default {\n  plugins: [\n    new NunjucksWebpackPlugin({\n      templates: [\n        { from: 'src/template.njk', to: 'template.html' }\n      ]\n    })\n  ]\n};","lang":"typescript","description":"Basic setup: compile a single Nunjucks template to an HTML output file via webpack.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}