rollup-config-whim

raw JSON →
3.0.0 verified Mon Apr 27 auth: no javascript

A protean Rollup configuration generator that adapts to personal preferences for module and web builds. Current stable version is 3.0.0. Provides two main helpers: configureModule() for ES module output and configureWeb() for browser bundles. The package requires Rollup as a peer dependency and is intended for developers who want a zero-config Rollup setup with opinionated defaults. It does not include TypeScript or Babel by default; users must add those plugins separately. Release cadence is irregular, driven by the author's whims.

error Cannot find module 'rollup-config-whim'
cause Package not installed or incorrect npm install command.
fix
Run: npm install --save-dev rollup rollup-config-whim
error 'configureModule' is not exported from 'rollup-config-whim'
cause Using import that expects default export when named export is required.
fix
Use import { configureModule } from 'rollup-config-whim'
error TypeError: Cannot read property 'input' of undefined
cause configureModule() returned undefined because of missing Rollup peer dependency.
fix
Install rollup: npm install --save-dev rollup
gotcha Package expects Rollup as peer dependency; missing Rollup causes build failures.
fix Install rollup alongside rollup-config-whim: npm install --save-dev rollup rollup-config-whim
gotcha configureWeb() returns an object without overriding output or plugins; those must be spread and overridden manually.
fix Use spread operator: { ...configureWeb(), output: {...} }
gotcha No built-in support for TypeScript, Babel, or other transpilers; user must add plugins manually.
fix Install and configure @rollup/plugin-typescript or @rollup/plugin-babel separately.
npm install rollup-config-whim
yarn add rollup-config-whim
pnpm add rollup-config-whim

Demonstrates using configureModule() with custom input/output in a Rollup config.

import { configureModule, configureWeb } from 'rollup-config-whim';

export default ({
  ...configureModule(),
  input: 'src/index.js',
  output: { file: 'dist/bundle.js', format: 'esm' }
});