{"id":25022,"library":"broccoli-less-single","title":"broccoli-less-single","description":"A Broccoli plugin that compiles a single primary LESS input file into a single CSS output file, handling @import dependencies. Current stable version is 2.0.1 (last release February 2017). It uses less.js under the hood and focuses on single-file output, unlike broccoli-less which compiles each LESS file individually. Key differentiator: supports imports and produces one output CSS file from multiple input files via LESS imports. The plugin is in maintenance mode with no recent updates.","status":"maintenance","version":"2.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/gabrielgrant/broccoli-less-single","tags":["javascript","broccoli-plugin","less","css"],"install":[{"cmd":"npm install broccoli-less-single","lang":"bash","label":"npm"},{"cmd":"yarn add broccoli-less-single","lang":"bash","label":"yarn"},{"cmd":"pnpm add broccoli-less-single","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for caching logic to avoid expensive rebuilds","package":"broccoli-caching-writer","optional":false},{"reason":"Core LESS compiler (peer dependency, but also listed as dependency)","package":"less","optional":false}],"imports":[{"note":"The package uses CommonJS; ESM import is not supported out of the box.","wrong":"import compileLess from 'broccoli-less-single';","symbol":"compileLess","correct":"const compileLess = require('broccoli-less-single');"},{"note":"If using ESM, dynamic import is needed to get the default export.","wrong":null,"symbol":"compileLess","correct":"const { default: compileLess } = await import('broccoli-less-single');"},{"note":"Named export is not provided; only a default export exists. Use default import style.","wrong":"import { compileLess } from 'broccoli-less-single';","symbol":"compileLess (as a named export)","correct":"const { compileLess } = require('broccoli-less-single');"}],"quickstart":{"code":"const Funnel = require('broccoli-funnel');\nconst compileLess = require('broccoli-less-single');\nconst mergeTrees = require('broccoli-merge-trees');\n\nconst appTree = new Funnel('app', { destDir: '.' });\nconst lessTree = compileLess(\n  [appTree],\n  'styles/app.less',\n  'assets/app.css',\n  {\n    paths: ['.'],\n    cacheInclude: [/.*\\.(css|less)$/],\n    cacheExclude: []\n  }\n);\n\nmodule.exports = mergeTrees([appTree, lessTree]);","lang":"javascript","description":"Shows how to use broccoli-less-single with broccoli-funnel and broccoli-merge-trees to compile a single LESS file to CSS with caching."},"warnings":[{"fix":"Do not rely on side effects on the options object; pass a fresh object each time.","message":"In version 0.5.0, the options hash passed to compileLess is now cloned to avoid mutation of the original object. If you relied on the hash being mutated, your code may break.","severity":"breaking","affected_versions":">=0.5.0 <=2.0.1"},{"fix":"Use alternative solutions that are actively maintained.","message":"The plugin is no longer actively maintained. Last release was in 2017. Consider migrating to a modern alternative like 'broccoli-less' or 'webpack' with LESS loader.","severity":"deprecated","affected_versions":"all"},{"fix":"Use require() or dynamic import.","message":"The package does not support ESM imports natively. Attempting 'import compileLess from ...' may fail in Node.js versions that strictly require ESM.","severity":"gotcha","affected_versions":"all"},{"fix":"Wrap a single node in an array: compileLess([node], ...).","message":"The 'inputNodes' must be an array even if you have only one node. Passing a single node object will cause an error.","severity":"gotcha","affected_versions":"all"},{"fix":"Use relative paths like 'assets/app.css'.","message":"Output file path must be relative and will be created relative to the Broccoli output tree. Absolute paths will not work.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you have installed 'broccoli-less-single' and require it correctly: const compileLess = require('broccoli-less-single');","cause":"Typo or confusion with similar package name 'broccoli-less'.","error":"Error: The 'broccoli-less-single' plugin does not exist. Did you mean 'broccoli-less'?"},{"fix":"Use const compileLess = require('broccoli-less-single');","cause":"Using ESM import incorrectly or forgetting to call require.","error":"TypeError: compileLess is not a function"},{"fix":"Wrap the node in an array: compileLess([node], ...)","cause":"Passing a single node object instead of an array.","error":"Error: inputNodes must be an array"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}