rollup-config-badger-den

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

A configurable Rollup plugin for bundling FoundryVTT (FVTT) modules. Current stable version 1.12.1. It supports multiple build profiles (debug, test, release), auto-discovery via glob, stylesheet bundling (Sass, Less, CSS), compendium extraction/compilation, external module inclusion, and distribution package creation (zip + manifest). Released under the MIT license with occasional updates. Key differentiator vs generic Rollup configs: it is purpose-built for FVTT module development with HMR support, profile-based builds, and automatic manifest generation.

error Error: Cannot find module 'rollup-config-badger-den'
cause Missing peer dependency or incorrect version of rollup (requires >=4.46).
fix
Install rollup latest: npm install -D rollup@latest
error Error: Invalid configuration file. Must have '.bd.json' extension.
cause Config file does not end with .bd.json or name is incorrect.
fix
Rename config file to end with .bd.json, e.g., my-module.bd.json
gotcha JavaScript files are not compatible with FoundryVTT's default HMR; only a browser refresh will pick up JS changes.
fix Use built-in watch mode and refresh browser manually for JS changes.
breaking Migration from v0.x to v1.0 changed the config file structure and removed compatibility with old bd.json format.
fix Update config file to match DenConfigJSON schema; see documentation.
deprecated The 'styles' property in den config is deprecated; use 'style' instead.
fix Rename 'styles' to 'style' in your .bd.json file.
npm install rollup-config-badger-den
yarn add rollup-config-badger-den
pnpm add rollup-config-badger-den

Shows basic setup: install, config file, and rollup.config.js import with profile selection.

// Install: npm install -D rollup-config-badger-den
// Create src/my-module.bd.json
// Example rollup.config.mjs:
import config from 'rollup-config-badger-den';

export default config({
  denConfigFile: 'src/my-module.bd.json',
  profile: 'dev',
  // Additional options...
});
// Run: rollup -c node:rollup-config-badger-den --config-den src/my-module:dev