Gathering detailed insights and metrics for handlebars-loader
Gathering detailed insights and metrics for handlebars-loader
Gathering detailed insights and metrics for handlebars-loader
Gathering detailed insights and metrics for handlebars-loader
npm install handlebars-loader
Typescript
Module System
Node Version
NPM Version
96.8
Supply Chain
94.5
Quality
79.2
Maintenance
100
Vulnerability
100
License
JavaScript (96.11%)
Handlebars (3.89%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
562 Stars
198 Commits
168 Forks
3 Watchers
9 Branches
26 Contributors
Updated on Apr 05, 2025
Latest Version
1.7.3
Package Id
handlebars-loader@1.7.3
Unpacked Size
22.75 kB
Size
6.87 kB
File Count
5
NPM Version
8.1.2
Node Version
16.13.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
1
A handlebars template loader for webpack.
Handlebars 4 now supported
npm i handlebars-loader --save
1{ 2 ... 3 module: { 4 rules: [ 5 ... 6 { test: /\.handlebars$/, loader: "handlebars-loader" } 7 ] 8 } 9}
1var template = require("./file.handlebars"); 2// => returns file.handlebars content as a template function
The loader resolves partials and helpers automatically. They are looked up relative to the current directory (this can be modified with the rootRelative
option) or as a module if you prefix with $
.
1A file "/folder/file.handlebars". 2{{> partial}} will reference "/folder/partial.handlebars". 3{{> ../partial}} will reference "/partial.handlebars". 4{{> $module/partial}} will reference "/folder/node_modules/module/partial.handlebars". 5{{helper}} will reference the helper "/folder/helper.js" if this file exists. 6{{[nested/helper] 'helper parameter'}} will reference the helper "/folder/nested/helper.js" if this file exists, passes 'helper parameter' as first parameter to helper. 7{{../helper}} {{$module/helper}} are resolved similarly to partials.
The following query (or config) options are supported:
handlebars/runtime
.esModule
Option in the corresponding file-loader entry in your webpack config../
. Setting this to be empty effectively turns off automatically resolving relative handlebars resources for items like {{helper}}
. {{./helper}}
will still resolve as expected.node_modules
directory.handlebarsLoader
.1handlebarsLoader: { 2 partialResolver: function(partial, callback){ 3 // should pass the partial's path on disk 4 // to the callback. Callback accepts (err, locationOnDisk) 5 } 6}
js handlebarsLoader: { helperResolver: function(helper, callback){ // should pass the helper's path on disk // to the callback if one was found for the given parameter. // Callback accepts (err, locationOnDisk) // Otherwise just call the callback without any arguments } }
See webpack
documentation for more information regarding loaders.See the examples folder in this repo. The examples are fully runnable and demonstrate a number of concepts (using partials and helpers) -- just run webpack
in that directory to produce dist/bundle.js
in the same folder, open index.html.
See the CHANGELOG.md file.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
Found 5/18 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
19 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More