rollup-plugin-bundle-less

raw JSON →
0.0.7 verified Mon Apr 27 auth: no javascript maintenance

A Rollup plugin that bundles imported LESS files into a single LESS output file at version 0.0.7. It works by specifying an entry LESS file (default styles.less), then inlining all @import statements recursively into one bundled file. This plugin targets only LESS preprocessing, not full compilation to CSS. It is a thin wrapper around less-bundle and has no active releases since initial publish; use with caution as it may lack maintenance for modern Rollup versions or advanced features.

error Cannot find module 'less-bundle'
cause Missing dependency less-bundle not installed automatically.
fix
Run 'npm install less-bundle' alongside this plugin.
error TypeError: lessBundler is not a function
cause Used named import instead of default import, or used require without .default.
fix
Use default import: import lessBundler from 'rollup-plugin-bundle-less'
error Error: Cannot read properties of undefined (reading 'src')
cause Plugin called without options object.
fix
Provide options object, e.g., lessBundler({ src: 'styles.less' })
gotcha Plugin does not compile LESS to CSS; output remains .less file.
fix Use rollup-plugin-less or rollup-plugin-postcss if you need CSS output.
gotcha Options 'source' and 'destination' are silently ignored; use 'src' and 'dest'.
fix Correct option keys: src, dest.
breaking Unmaintained since 2019; may not work with Rollup >=3.
fix Test compatibility or consider alternative plugins.
npm install rollup-plugin-bundle-less
yarn add rollup-plugin-bundle-less
pnpm add rollup-plugin-bundle-less

Configures Rollup to bundle all LESS imports from src/styles.less into dist/bundled.less using rollup-plugin-bundle-less.

import lessBundler from 'rollup-plugin-bundle-less';

export default {
  input: 'src/index.js',
  output: {
    file: 'dist/bundle.js',
    format: 'esm'
  },
  plugins: [
    lessBundler({
      src: 'src/styles.less',
      dest: 'dist/bundled.less'
    })
  ]
};