Registry / web-framework / fxa-mustache-loader

fxa-mustache-loader

JSON →
library0.0.2jsnpmunverified

Webpack loader for Mustache templates, designed for Firefox Accounts and compatible with Content Security Policy. Version 0.0.2, last updated in 2015, unmaintained. Generates inline JavaScript that embeds the template string, avoiding eval or dynamic code execution. Minimal alternative to mustache-loader with CSP focus, but no updates for modern webpack versions.

npm install fxa-mustache-loader
INSTALL
IMPORT
SIG · FXA-MUSTACHE-LOADE
F
fxa-mustache-loader
web-frameworkjavascriptv0.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (loader)
module.exports = function(source) { ... }
export default function(source) { ... }
CommonJS module expected by webpack loaders.
Webpack rule usage
rules: [{ test: /\.mustache$/, loader: 'fxa-mustache-loader' }]
rules: [{ test: /\.mustache$/, use: 'fxa-mustache-loader' }]
use array also works, but loader property is correct.
Require in Node.js (not common)
const fxaMustacheLoader = require('fxa-mustache-loader');
import fxaMustacheLoader from 'fxa-mustache-loader';
Package is CJS; ESM import works only in environments that support it.

Configures webpack to use fxa-mustache-loader for .mustache files, imports template as a function, and renders with data.

// webpack.config.js const path = require('path'); module.exports = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js' }, module: { rules: [ { test: /\.mustache$/, loader: 'fxa-mustache-loader' } ] } }; // src/template.mustache // <h1>{{title}}</h1> // src/index.js import template from './template.mustache'; const html = template({ title: 'Hello' }); document.body.innerHTML = html;
Debug
Known issues
breakingPackage is incompatible with webpack 4+ because it uses deprecated loader API (loader-utils v1).
fix
Switch to mustache-loader or html-loader with mustache preprocessor.
affects: >=4.0.0
deprecatedPackage has not been updated since 2015; use at your own risk.
fix
Consider using modern alternatives: handlebars-loader, marko-loader, or static template compilation.
affects: *
gotchaLoader returns a CommonJS module, not ES module; import may behave unexpectedly in strict ESM contexts.
fix
Use require() or configure webpack appropriately.
affects: *
gotchaOnly works with webpack; no standalone usage or other bundler support.
fix
Use mustache package directly with other bundlers.
affects: *
Errors
Common errors & fixes
Module not found: Error: Can't resolve 'fxa-mustache-loader'
Loader not installed or webpack cannot find it in node_modules.
fix
npm install --save-dev fxa-mustache-loader
Error: DeprecationWarning: loaderUtils.parseQuery is deprecated
Using webpack 4+ with old loader-utils API.
fix
Switch to a maintained loader like mustache-loader.
TypeError: loaderUtils.getOptions is not a function
Incompatible with webpack 5+ which changed loader context.
fix
Use webpack 3 or update loader.
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies
mustacherequiredPeer dependency for template compilation
loader-utilsoptionalUsed internally by webpack loaders
Agent activity
2 hits · last 30 days
node
2
Resources
fxa-mustache-loader — npm install fxa-mustache-loader · libregistry