{"library":"mustache-loader","title":"mustache-loader","description":"A webpack loader that compiles Mustache templates using Hogan.js. Current stable version is 1.4.3, with last release in 2016. It has peer dependencies on hogan.js and webpack (supports webpack 1.x, 2.x, and 4.x beta). Supports options like minification via html-minifier, tiny output, client-side compilation, and direct rendering. Differentiators include optional noShortcut for partials and render function for hot reloading. It is a straightforward conversion from Mustache templates to JavaScript functions, with minimal overhead.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install mustache-loader"],"cli":null},"imports":["import template from './file.html';","const template = require('./file.html');","const template = require('./file.html'); const html = template.render({foo: 'bar'});"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.html$/,\n        use: 'mustache-loader',\n      },\n    ],\n  },\n};\n\n// app.js\nimport template from './template.html';\nconst html = template({ name: 'World' });\nconsole.log(html);","lang":"javascript","description":"Shows basic webpack configuration to use mustache-loader and how to import and use a compiled template.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}