{"library":"slim-lang-loader","title":"slim-lang-loader","description":"Webpack loader that transforms Slim template files into HTML strings embedded in JavaScript. Version 0.0.9 (latest as of 2019) wraps the Ruby `slimrb` CLI, meaning it requires Ruby and the Slim gem installed globally. Unlike other Slim-to-HTML converters, this is a true Ruby-based conversion, preserving full Slim feature support (e.g., inline Ruby, Slim options). The loader outputs HTML that can be used as string templates or passed to further loaders (e.g., html-loader). Last updated in 2019; no active development, but functional for projects already using Ruby Slim.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install slim-lang-loader"],"cli":null},"imports":["import html from 'html-loader!./file.slim'","{ test: /\\.slim$/, use: ['slim-lang-loader'] }","const config = { module: { rules: [ { test: /\\.slim$/, use: [ { loader: 'slim-lang-loader', options: { slimOptions: { disable_escape: true } } } ] } ] } }"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.slim$/,\n        use: [\n          'slim-lang-loader'\n        ]\n      }\n    ]\n  },\n  resolve: {\n    extensions: ['.js', '.slim']\n  }\n};\n\n// template.slim\ndoctype html\nhtml\n  head\n    title Example\n  body\n    h1 Hello from Slim!\n\n// app.js\nimport html from './template.slim';\ndocument.body.innerHTML = html;","lang":"javascript","description":"Configures webpack to process .slim files via slim-lang-loader, then imports a Slim template as an HTML string.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}