{"_id":"@dryfeld/nunjucks-loader","_rev":"8-6043284b02725e81db8aef592c430c80","name":"@dryfeld/nunjucks-loader","dist-tags":{"latest":"4.0.7"},"versions":{"4.0.0":{"name":"@dryfeld/nunjucks-loader","version":"4.0.0","keywords":["webpack","nunjucks","nunj","loader","template"],"author":{"name":"Ben Daley","email":"ben@fanboy.io"},"license":"MIT","_id":"@dryfeld/nunjucks-loader@4.0.0","maintainers":[{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"}],"homepage":"https://github.com/at0g/nunjucks-loader","bugs":{"url":"https://github.com/at0g/nunjucks-loader/issues"},"dist":{"shasum":"a0790f400dc686d955e2f2340a970a721542e8fc","tarball":"https://registry.npmjs.org/@dryfeld/nunjucks-loader/-/nunjucks-loader-4.0.0.tgz","fileCount":5,"integrity":"sha512-dRn81cczs9zxzzI4abubcAYsqvsmAHks3QfbfMI+ULe4hsrbXOjicLZT8Z7iYi0mJUnB13+jB7M/o2yZe03L4g==","signatures":[{"sig":"MEUCIA4MMwrvD87/TIJ5W/nD5cwypDrZo070cvuVjkRWFQBhAiEA2N+WBhsU/B39UxmXggDiWdaUxvNDMnANKrLCAc6mbxM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15798},"main":"index.js","gitHead":"35da8d2e23895975c418864eaac3ff3a354205a6","scripts":{"test":"webpack-dev-server --config test/webpack.config.js"},"_npmUser":{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"},"repository":{"url":"git://github.com/at0g/nunjucks-loader.git","type":"git"},"_npmVersion":"8.19.3","description":"A nunjucks loader for webpack.","directories":{},"_nodeVersion":"19.1.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^5.1.0","slash":"^5.1.0","webpack":"^5.90.3","nunjucks":"^3.2.4","raw-loader":"^4.0.2","webpack-cli":"^5.1.4","mocha-loader":"^5.1.5","webpack-dev-server":"^5.0.2"},"peerDependencies":{"nunjucks":">= 2.5.0 <= 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nunjucks-loader_4.0.0_1710237824600_0.7134475276544467","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"@dryfeld/nunjucks-loader","version":"4.0.1","keywords":["webpack","nunjucks","nunj","loader","template"],"author":{"name":"Ben Daley","email":"ben@fanboy.io"},"license":"MIT","_id":"@dryfeld/nunjucks-loader@4.0.1","maintainers":[{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"}],"homepage":"https://github.com/at0g/nunjucks-loader","bugs":{"url":"https://github.com/at0g/nunjucks-loader/issues"},"dist":{"shasum":"58ff3488f14a8e0f4043aea0ad4bdd9f00dee932","tarball":"https://registry.npmjs.org/@dryfeld/nunjucks-loader/-/nunjucks-loader-4.0.1.tgz","fileCount":5,"integrity":"sha512-Q/bXK+bcRAT+17Go/MQQ/89pVcYzjkEhD+xbXZm3IBMSUieQgVxn728HSKjgD+uyBiOkGitww0fpEQ5yynQwXQ==","signatures":[{"sig":"MEUCIQDo/hmPBYPfpGiy7IQoBUwdcjwr96thttWgPFLOHkqvtgIgJxnfHOaBOxVOJGfK+3Jvx6Zw8xUrviOBvkU2SOqv/go=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15833},"main":"index.js","gitHead":"35da8d2e23895975c418864eaac3ff3a354205a6","scripts":{"test":"webpack-dev-server --config test/webpack.config.js"},"_npmUser":{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"},"repository":{"url":"git://github.com/at0g/nunjucks-loader.git","type":"git"},"_npmVersion":"8.19.3","description":"A nunjucks loader for webpack.","directories":{},"_nodeVersion":"19.1.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^5.1.0","slash":"^5.1.0","webpack":"^5.90.3","nunjucks":"^3.2.4","raw-loader":"^4.0.2","webpack-cli":"^5.1.4","mocha-loader":"^5.1.5","webpack-dev-server":"^5.0.2"},"peerDependencies":{"nunjucks":">= 2.5.0 <= 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nunjucks-loader_4.0.1_1710244601197_0.31171736160638863","host":"s3://npm-registry-packages"}},"4.0.2":{"name":"@dryfeld/nunjucks-loader","version":"4.0.2","keywords":["webpack","nunjucks","nunj","loader","template"],"author":{"name":"Ben Daley","email":"ben@fanboy.io"},"license":"MIT","_id":"@dryfeld/nunjucks-loader@4.0.2","maintainers":[{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"}],"homepage":"https://github.com/at0g/nunjucks-loader","bugs":{"url":"https://github.com/at0g/nunjucks-loader/issues"},"dist":{"shasum":"220a580c073a323df171fa7687d026cdaf86e27e","tarball":"https://registry.npmjs.org/@dryfeld/nunjucks-loader/-/nunjucks-loader-4.0.2.tgz","fileCount":5,"integrity":"sha512-zozM5vbAf3SxrAJ+0Scgp99ssEnAiDSWcUVAyWkYYu3ne0vpAlZK6f98ciT1dTfDtChNYIsH1wWvnVmqVOyLTA==","signatures":[{"sig":"MEYCIQCrcUuSosFsnJVRSQYLbAWocIeUUHfxmJjLtMRVa/wxUAIhAJUcwBX6rn6Vk/dlCc+ES0U1EG9R6kIkFvjoM68Os5QE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15799},"main":"index.js","gitHead":"a2f67babef653fa29916c633fdc87296d1e5789d","scripts":{"test":"webpack-dev-server --config test/webpack.config.js"},"_npmUser":{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"},"repository":{"url":"git://github.com/at0g/nunjucks-loader.git","type":"git"},"_npmVersion":"8.19.3","description":"A nunjucks loader for webpack.","directories":{},"_nodeVersion":"19.1.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^5.1.0","slash":"^5.1.0","webpack":"^5.90.3","nunjucks":"^3.2.4","raw-loader":"^4.0.2","webpack-cli":"^5.1.4","mocha-loader":"^5.1.5","webpack-dev-server":"^5.0.2"},"peerDependencies":{"nunjucks":">= 2.5.0 <= 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nunjucks-loader_4.0.2_1710244870358_0.6030047224799377","host":"s3://npm-registry-packages"}},"4.0.3":{"name":"@dryfeld/nunjucks-loader","version":"4.0.3","keywords":["webpack","nunjucks","nunj","loader","template"],"author":{"name":"Ben Daley","email":"ben@fanboy.io"},"license":"MIT","_id":"@dryfeld/nunjucks-loader@4.0.3","maintainers":[{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"}],"homepage":"https://github.com/jsutcliffe/nunjucks-loader","bugs":{"url":"https://github.com/jsutcliffe/nunjucks-loader/issues"},"dist":{"shasum":"0cd4c7c06ca07123a72f703ae4cce4c7ec5a59aa","tarball":"https://registry.npmjs.org/@dryfeld/nunjucks-loader/-/nunjucks-loader-4.0.3.tgz","fileCount":5,"integrity":"sha512-lhBuoPH307HOjgkfE8stoTycGQRZexWBBbjMDifuHiKRWFDd17gHNMtR1HsbKGoYAQTgZbGM04lfDkD3uGg2Gw==","signatures":[{"sig":"MEUCIFNp94QfaM1q0DKxl7yf1o4YmYDSaT6JdsWUA0IIlqHkAiEAz6ktf4kcRusmmnmJbLDahM83pPoJjTQYCvoGyvY8gWI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15883},"main":"index.js","gitHead":"0e357699cf1a2a2aff9b6acf9d36f3f8a294c9ff","scripts":{"test":"webpack-dev-server --config test/webpack.config.js"},"_npmUser":{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"},"repository":{"url":"git://github.com/jsutciffe/nunjucks-loader.git","type":"git"},"_npmVersion":"8.19.3","description":"A nunjucks loader for webpack.","directories":{},"_nodeVersion":"19.1.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^5.1.0","slash":"^5.1.0","webpack":"^5.90.3","nunjucks":"^3.2.4","raw-loader":"^4.0.2","webpack-cli":"^5.1.4","mocha-loader":"^5.1.5","webpack-dev-server":"^5.0.2"},"peerDependencies":{"nunjucks":">= 2.5.0 <= 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nunjucks-loader_4.0.3_1710245088634_0.153208108978786","host":"s3://npm-registry-packages"}},"4.0.4":{"name":"@dryfeld/nunjucks-loader","version":"4.0.4","keywords":["webpack","nunjucks","nunj","loader","template"],"author":{"name":"Ben Daley","email":"ben@fanboy.io"},"license":"MIT","_id":"@dryfeld/nunjucks-loader@4.0.4","maintainers":[{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"}],"homepage":"https://github.com/jsutcliffe/nunjucks-loader","bugs":{"url":"https://github.com/jsutcliffe/nunjucks-loader/issues"},"dist":{"shasum":"b7bb21a00b51a3b525f8196defbedfcd31bfc97c","tarball":"https://registry.npmjs.org/@dryfeld/nunjucks-loader/-/nunjucks-loader-4.0.4.tgz","fileCount":5,"integrity":"sha512-ZpohhSwhMUq0si5gbZCBKLzT+BuHWHQUmGDIkRQfFm6AZuEOrGRnLHztzqGeKZ51p13mp4rryijms2vTr9ZYPA==","signatures":[{"sig":"MEQCIBenHg0w4lxZMlX2eehx8gkTzjPIpBtEPwtPSNzVcjEHAiAmMoS+h1Qmr9dna2lemAJ6nU+lf0nIDTvlcRtLCACpVg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15980},"main":"index.js","gitHead":"18f706b7e22634aed253183b75ed67bac4ce0458","scripts":{"test":"webpack-dev-server --config test/webpack.config.js"},"_npmUser":{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"},"repository":{"url":"git://github.com/jsutciffe/nunjucks-loader.git","type":"git"},"_npmVersion":"8.19.3","description":"A nunjucks loader for webpack.","directories":{},"_nodeVersion":"19.1.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^5.1.0","slash":"^5.1.0","webpack":"^5.90.3","nunjucks":"^3.2.4","raw-loader":"^4.0.2","webpack-cli":"^5.1.4","mocha-loader":"^5.1.5","webpack-dev-server":"^5.0.2"},"peerDependencies":{"nunjucks":">= 2.5.0 <= 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nunjucks-loader_4.0.4_1710247674366_0.5503217481060934","host":"s3://npm-registry-packages"}},"4.0.5":{"name":"@dryfeld/nunjucks-loader","version":"4.0.5","keywords":["webpack","nunjucks","nunj","loader","template"],"author":{"name":"Ben Daley","email":"ben@fanboy.io"},"license":"MIT","_id":"@dryfeld/nunjucks-loader@4.0.5","maintainers":[{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"}],"homepage":"https://github.com/jsutcliffe/nunjucks-loader","bugs":{"url":"https://github.com/jsutcliffe/nunjucks-loader/issues"},"dist":{"shasum":"fe8d93e01e873790bed85990848b51a6b67d4d69","tarball":"https://registry.npmjs.org/@dryfeld/nunjucks-loader/-/nunjucks-loader-4.0.5.tgz","fileCount":7,"integrity":"sha512-80G6v+SPhO7IwT2CMdMe9hAcYfSOBqJsKaSxcRK1egGcfXasWSOGhsXEW2099DNcyZYfEm3/6VGzwyVsDQjAKA==","signatures":[{"sig":"MEQCIFfFtyFuxX2pMVl6abXpUmtOHb67ODgDy4cv4rhHKnTcAiBaVr0EijhDjeTthbsEwXETyQc0KX6MZTkU0IsdLiFLaQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":334227},"main":"index.js","gitHead":"5f71af0a0492e5720841b25a4b6ffff2a1207834","scripts":{"test":"webpack-dev-server --config test/webpack.config.js"},"_npmUser":{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"},"repository":{"url":"git://github.com/jsutciffe/nunjucks-loader.git","type":"git"},"_npmVersion":"10.9.2","description":"A nunjucks loader for webpack.","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^5.1.0","slash":"^5.1.0","webpack":"^5.90.3","nunjucks":"^3.2.4","raw-loader":"^4.0.2","webpack-cli":"^5.1.4","mocha-loader":"^5.1.5","webpack-dev-server":"^5.0.2"},"peerDependencies":{"nunjucks":">= 2.5.0 <= 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nunjucks-loader_4.0.5_1768913094061_0.8294997158735775","host":"s3://npm-registry-packages-npm-production"}},"4.0.6":{"name":"@dryfeld/nunjucks-loader","version":"4.0.6","keywords":["webpack","nunjucks","nunj","loader","template"],"author":{"name":"Ben Daley","email":"ben@fanboy.io"},"license":"MIT","_id":"@dryfeld/nunjucks-loader@4.0.6","maintainers":[{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"}],"homepage":"https://github.com/jsutcliffe/nunjucks-loader","bugs":{"url":"https://github.com/jsutcliffe/nunjucks-loader/issues"},"dist":{"shasum":"b533813048fbf043c105771e12c030054d2ff31c","tarball":"https://registry.npmjs.org/@dryfeld/nunjucks-loader/-/nunjucks-loader-4.0.6.tgz","fileCount":7,"integrity":"sha512-8VrlPRkQuC1uBv873/DhIR1HhZj76aO1Dz3PCoAPxW0CGPv8AjqcDXE2MoZ69vy4FmBro2l4DOwj6slinZK6SQ==","signatures":[{"sig":"MEUCIQD+yQ3PZAOTAGjvjxZItKyEnADeXIYTNCkZgm/2afpH6wIgZ1+I46/zw+GtzGK+VDUPSIlY0Nuu7cTjXRSZxz//Dxg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":334009},"main":"index.js","gitHead":"b1528246b93b3b0ac14e2a43ce03b195fe2b07a7","scripts":{"test":"webpack-dev-server --config test/webpack.config.js"},"_npmUser":{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"},"repository":{"url":"git://github.com/jsutciffe/nunjucks-loader.git","type":"git"},"_npmVersion":"10.9.2","description":"A nunjucks loader for webpack.","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^5.1.0","slash":"^5.1.0","webpack":"^5.90.3","nunjucks":"^3.2.4","raw-loader":"^4.0.2","webpack-cli":"^5.1.4","mocha-loader":"^5.1.5","webpack-dev-server":"^5.0.2"},"peerDependencies":{"nunjucks":">= 2.5.0 <= 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nunjucks-loader_4.0.6_1768913366301_0.002128851131208531","host":"s3://npm-registry-packages-npm-production"}},"4.0.7":{"name":"@dryfeld/nunjucks-loader","version":"4.0.7","description":"A nunjucks loader for webpack.","main":"index.js","scripts":{"test":"webpack-dev-server --config test/webpack.config.js"},"repository":{"type":"git","url":"git://github.com/jsutciffe/nunjucks-loader.git"},"keywords":["webpack","nunjucks","nunj","loader","template"],"author":{"name":"Ben Daley","email":"ben@fanboy.io"},"license":"MIT","bugs":{"url":"https://github.com/jsutcliffe/nunjucks-loader/issues"},"homepage":"https://github.com/jsutcliffe/nunjucks-loader","peerDependencies":{"nunjucks":">= 2.5.0 <= 4.0.0"},"devDependencies":{"chai":"^5.1.0","mocha-loader":"^5.1.5","nunjucks":"^3.2.4","raw-loader":"^4.0.2","slash":"^5.1.0","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-dev-server":"^5.0.2"},"_id":"@dryfeld/nunjucks-loader@4.0.7","gitHead":"1221077df0b23e5e897a6f7df359c79b68db5422","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-EP7wZ3FwvRiCYBY/Dw3L7+J3xgQtl3XASpxTQn7NogMEwC/OiOf4D6yxFTzaCr7NcPgY9d4DTJJ6w5FKfTWCDw==","shasum":"fd02dce40fe05aa348b076cdebd24f8383030ff7","tarball":"https://registry.npmjs.org/@dryfeld/nunjucks-loader/-/nunjucks-loader-4.0.7.tgz","fileCount":7,"unpackedSize":334028,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDis2SgbafAvYuv6WSfgD16wxFaJNJUftiVHby74VGZ2AIgISxcNksJ63y+SN2qDdRN4GkaMxnuJGrAFbAja8M6x+0="}]},"_npmUser":{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"},"directories":{},"maintainers":[{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nunjucks-loader_4.0.7_1771848819082_0.2115848578003141"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-12T10:03:44.489Z","modified":"2026-02-23T12:13:39.350Z","4.0.0":"2024-03-12T10:03:44.788Z","4.0.1":"2024-03-12T11:56:41.366Z","4.0.2":"2024-03-12T12:01:10.511Z","4.0.3":"2024-03-12T12:04:48.798Z","4.0.4":"2024-03-12T12:47:54.515Z","4.0.5":"2026-01-20T12:44:54.207Z","4.0.6":"2026-01-20T12:49:26.467Z","4.0.7":"2026-02-23T12:13:39.245Z"},"bugs":{"url":"https://github.com/jsutcliffe/nunjucks-loader/issues"},"author":{"name":"Ben Daley","email":"ben@fanboy.io"},"license":"MIT","homepage":"https://github.com/jsutcliffe/nunjucks-loader","keywords":["webpack","nunjucks","nunj","loader","template"],"repository":{"type":"git","url":"git://github.com/jsutciffe/nunjucks-loader.git"},"description":"A nunjucks loader for webpack.","maintainers":[{"name":"dryfeld","email":"jonathan.a.sutcliffe@gmail.com"}],"readme":"# Nunjucks loader for webpack\n\n- `require` precompiled templates in webpack\n- supports `extends` and `include`\n- resolves template dependencies using `require`\n- bundles the nunjucks-slim browser runtime\n- use the version of nunjucks you want to as a peer dependency\n- supports experimental Jinja compatibility\n\n## Usage\n\n[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)\n\n### Recommended configuration\n\nInstall: `npm install nunjucks-loader --save`\n\nAdd to webpack.config to process all .njk and .nunjucks files:\n\n``` javascript\n// file: webpack.config.js\nmodule.exports = {\n\n    entry: './src/entry.js',\n\n    output: {\n        path: __dirname,\n        filename: 'bundle.js'\n    },\n\n    module: {\n        loaders: [\n            {\n                test: /\\.(njk|nunjucks)$/,\n                loader: 'nunjucks-loader'\n            }\n        ]\n    }\n\n};\n```\n\nThen use it in your module code without the `nunjucks!` prefix:\n\n``` javascript\n// file: src/entry.js\nvar tpl = require('./views/page.njk');\nvar html = tpl.render({ message: 'Foo that!' });\n```\n\n#### Inline configuration (not recommended)\n\nIf using the inline configuration (below), references inside of templates to other files (parents, imports etc) may not\nresolve correctly - hence it's preferable to use the webpack.config method above.\n\n``` javascript\nvar tpl = require(\"nunjucks!./views/page.njk\");\nvar html = tpl.render({ message: 'Foo that!' });\n```\n\n\n### webpack.target = 'node'\n\n**The 2.x versions of this loader do not support node/UMD bundles.**\n\nIf you need to support node or UMD with the bundle, the 1.x version (`npm install nunjucks-loader@1.0.7`) supports these\n targets.\n\n\n\n### Filters and extensions\n\nA *require* filter is added by this package that allows you to use webpack to resolve file references.\nEg.\n\n```\n{# use the raw-loader to replace 'readme.txt' with the contents of that file #}\n{{ 'raw!readme.txt' | require }}\n```\n\n\nA custom nunjucks.Environment is used by the loader, to configure the nunjucks environment:\n\n- To pass [nunjucks.Environment options](https://mozilla.github.io/nunjucks/api.html#environment), add a `opts` key to\n the nunjucks loader query in webpack.config.js\n- Create a file that will configure the environment. This should export a function that receives the nunjucks\n environment as its first argument.\n- Add a `config` key to the nunjucks-loader query in webpack.config.js\n- Add an optional `quiet` key to the loader query in webpack.config.js to suppress precompile warnings (see below)\n\n``` javascript\n// file: src/nunjucks.config.js\nmodule.exports = function(env){\n    \n    env.addFilter('asyncFoo', function(input, done){\n        setTimeout(function(){\n            done('[asyncFoo] ' + input);\n        }, 1000)\n    }, true);\n    \n    // env.addExtension(...) etc\n}\n\n// file: webpack.config.js\nmodule.exports = {\n\n    entry: './src/entry.js',\n\n    output: {\n        path: __dirname,\n        filename: 'bundle.js'\n    },\n\n    module: {\n        loaders: [\n            {\n                test: /\\.(njk|nunjucks)$/,\n                loader: 'nunjucks-loader',\n                query: {\n                    config: __dirname + '/src/nunjucks.config.js'\n                }\n            }\n        ]\n    }\n};\n\n```\n\n__If using async filters or custom extensions with nunjucks__, they must be available before the template is precompiled.\n If the nunjucks config file depends on webpack resolve (such as loaders or custom module paths), the custom\n filters/extensions will not be available at precompile time. When/if this happens, you will receive the following\n warning in the console:\n\n*Cannot configure nunjucks environment before precompile*\n\nWhen using webpack resolve with the environment config and __not__ using async filters or custom extensions, the warning\n can be safely ignored - standard filters are still added to the environment at runtime.\n\nTo remove the warning, pass the `quiet` option in the loader query. eg:\n\n```\n// file: webpack.config.js\nmodule.exports = {\n\n    module: {\n        loaders: [\n            {\n                test: /\\.(njk|nunjucks)$/,\n                loader: 'nunjucks-loader',\n                query: {\n                    config: __dirname + '/src/nunjucks.config.js',\n                    quiet: true // Don't show the 'Cannot configure nunjucks environment before precompile' warning\n                }\n            }\n        ]\n    }\n};\n```\n\n\n\n\n## Path resolution\n\nThis loader modifies the way nunjucks resolves dependencies (eg `extends`, `import` and `include`) to work correctly \nwith webpack. As a result, you may use `require` style relative paths in your templates.\nAdd a `resolve.root` key to `webpack.config.js` to resolve your templates without using relative paths.\n\n\n``` javascript\n// file: webpack.config.js\nmodule.exports = {\n    resolve: {\n        root: [\n            __dirname,\n            __dirname + '/src/views'    // Resolve templates to ./src/views\n        ]\n    }\n}\n```\n\nAlternatively, a `root` query parameter can be passed to the loader to set the root template directory.\n\n``` javascript\n// webpack.config.js\nmodule.exports = {\n    module: {\n        loaders: [\n            {\n                test: /\\.(nunj|nunjucks)$/,\n                loader: 'nunjucks-loader',\n                query: {\n                    root: __dirname + '/path/to/templates'\n                }\n            }\n        ]\n    }\n}\n```\n\n\n## Jinja/Python compatibility\n\nIf [experimental support for Jinja compatibility](https://mozilla.github.io/nunjucks/api.html#installjinjacompat)\nis desired, pass the jinjaCompat option in the loader query. eg:\n\n```\n// file: webpack.config.js\nmodule.exports = {\n\n    module: {\n        loaders: [\n            {\n                test: /\\.(nunj|nunjucks)$/,\n                loader: 'nunjucks-loader',\n                query: {\n                    jinjaCompat: true\n                }\n            }\n        ]\n    }\n};\n```\n\nThis option will not provide full Jinja/Python compatibility, but will treat `True`/`False` like `true`/`false`, and\naugment arrays and objects with Python-style methods (such as `count`, `find`, `insert`, `get`, and `update`).\nReview the [jinja-compat source](https://github.com/mozilla/nunjucks/blob/master/src/jinja-compat.js) to see\neverything it adds.\n\n\n\n\n## Tests\n\n`npm run test`\nNavigate to http://localhost:8080/test\n","readmeFilename":"readme.md"}