{"id":20089,"library":"hamlc-loader","title":"hamlc-loader","description":"Webpack loader for Haml-Coffee templates, allowing import of .hamlc files as template functions. Current version 0.0.11. This package is unmaintained since 2016 and relies on deprecated dependencies like haml-coffee. It returns a function that takes locals and renders HTML. No updates in years; not recommended for new projects.","status":"deprecated","version":"0.0.11","language":"javascript","source_language":"en","source_url":"https://github.com/ericdfields/hamlc-loader","tags":["javascript"],"install":[{"cmd":"npm install hamlc-loader","lang":"bash","label":"npm"},{"cmd":"yarn add hamlc-loader","lang":"bash","label":"yarn"},{"cmd":"pnpm add hamlc-loader","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime dependency for compiling Haml-Coffee templates","package":"haml-coffee","optional":false},{"reason":"Peer dependency; loader used with webpack","package":"webpack","optional":false}],"imports":[{"note":"Webpack loaders with CommonJS exports require require() in older webpack versions. ESM import may not work without further configuration.","wrong":"import template from './template.hamlc';","symbol":"default","correct":"const template = require('./template.hamlc');"}],"quickstart":{"code":"// webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      { test: /\\.hamlc$/, loader: 'hamlc-loader' }\n    ]\n  }\n};\n\n// mytemplate.hamlc\n.template\n  %h1= @title\n\n// app.js\nconst tmpl = require('./mytemplate.hamlc');\nconst html = tmpl({ title: 'Hello' });\nconsole.log(html);\n// <div class=\"template\">\\n  <h1>Hello</h1>\\n</div>","lang":"javascript","description":"Shows webpack config to load .hamlc files and usage of the template function with locals."},"warnings":[{"fix":"Switch to an alternative like haml-loader or migrate to a different template engine.","message":"Package is abandoned; last update 2016. Not compatible with webpack 4+ without modification.","severity":"deprecated","affected_versions":">=0.0.11"},{"fix":"Ensure haml-coffee is installed and compatible; check for updates or alternatives.","message":"Requires haml-coffee as a runtime dependency; it may have incompatible versions or security issues.","severity":"gotcha","affected_versions":"*"},{"fix":"Use require() for .hamlc files in webpack 3 or earlier.","message":"Must use CommonJS require() in webpack config and modules; ES modules may not work directly.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install haml-coffee --save-dev'","cause":"Missing dependency haml-coffee not installed.","error":"Module not found: Error: Cannot resolve module 'haml-coffee'"},{"fix":"Add { test: /\\.hamlc$/, loader: 'hamlc-loader' } to your webpack config.","cause":"Webpack not configured with hamlc-loader for .hamlc files.","error":"Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type."},{"fix":"Use 'const template = require('./file.hamlc');'","cause":"Using ES import syntax 'import' instead of CommonJS 'require'.","error":"TypeError: template is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}