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.
npm install slim-lang-loaderVerified import paths — ran on the pinned version, not inferred.
Configures webpack to process .slim files via slim-lang-loader, then imports a Slim template as an HTML string.
Install Ruby and run 'gem install slim' before building.
Use a cache-loader or only for limited use. Consider alternative Slim-to-HTML loaders that are JS-only.
Chain with html-loader or manually wrap the output in module.exports.
Use webpack's cache-loader or external caching.
Install Ruby and run 'gem install slim'. Verify 'which slimrb' works.
Add { test: /\.slim$/, use: ['slim-lang-loader'] } to webpack config.Use 'html-loader' after slim-lang-loader, or wrap the require/import to handle a string.