{"id":24984,"library":"bdbuilder","title":"BDBuilder","description":"A specialized build tool and transpiler for BetterDiscord plugins that allows developers to write plugins using multiple files, TypeScript, or modern JavaScript, then bundles them into a single plugin file compatible with BetterDiscord. Currently at version 1.2.6-preview.4, it's in preview stage and not yet released on the official npm registry. It provides features like production builds, watch mode for development, and automatic copying to the BetterDiscord plugins folder. Compared to alternatives like Ittai, BDBuilder is a simpler, dedicated solution for BetterDiscord plugin development, focusing on ease of use and essential functionality.","status":"active","version":"1.2.6-preview.4","language":"javascript","source_language":"en","source_url":"git://github.com/BetterDiscordBuilder/bdbuilder","tags":["javascript"],"install":[{"cmd":"npm install bdbuilder","lang":"bash","label":"npm"},{"cmd":"yarn add bdbuilder","lang":"bash","label":"yarn"},{"cmd":"pnpm add bdbuilder","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Optional peer dependency for source code transformation when using TypeScript","package":"typescript","optional":true}],"imports":[{"note":"Package is distributed as ESM only. CommonJS require will fail.","wrong":"const bdbuilder = require('@betterdiscordbuilder/bdbuilder')","symbol":"bdbuilder","correct":"import { bdbuilder } from '@betterdiscordbuilder/bdbuilder'"},{"note":"Default export is the main build function. Named export bdbuilder is also available for named usage.","wrong":"import { bdbuilder } from '@betterdiscordbuilder/bdbuilder'","symbol":"default","correct":"import bdbuilder from '@betterdiscordbuilder/bdbuilder'"},{"note":"Type import for TypeScript users to define plugin configuration.","symbol":"PluginConfig","correct":"import { PluginConfig } from '@betterdiscordbuilder/bdbuilder'"}],"quickstart":{"code":"// bdbuilder.config.ts\nimport { defineConfig } from '@betterdiscordbuilder/bdbuilder';\nexport default defineConfig({\n  plugin: './src/index.ts',\n  copy: 'C:/Users/Username/AppData/Roaming/BetterDiscord/plugins',\n  watch: true,\n  production: false,\n});\n\n// Or CLI usage:\n// npx @betterdiscordbuilder/bdbuilder --plugin=\"./src/index.ts\" --copy=\"./plugins\" --watch --production","lang":"typescript","description":"Shows configuration-based and CLI ways to build a BetterDiscord plugin with BDBuilder, including watch mode and copy destination."},"warnings":[{"fix":"Set up .npmrc file with @betterdiscordbuilder:registry=https://npm.pkg.github.com and authenticate with a GitHub token.","message":"Package is not yet published on official npm registry; only available via GitHub Packages.","severity":"breaking","affected_versions":"all"},{"fix":"Migrate from ittai to @betterdiscordbuilder/bdbuilder for BetterDiscord plugin development.","message":"The 'ittai' package is considered legacy; BDBuilder is the simpler successor.","severity":"deprecated","affected_versions":"N/A"},{"fix":"Manually restart the watch process after adding new source files.","message":"Watch mode may not automatically rebuild if new files are added to the plugin directory; only changes to existing files trigger rebuilds.","severity":"gotcha","affected_versions":"all"},{"fix":"Update Node.js to a version >=14.","message":"The package requires Node.js version >=14 due to ESM and async/await usage.","severity":"gotcha","affected_versions":">=1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Create .npmrc with 'registry', authenticate with GitHub token, then reinstall.","cause":"Package not installed because .npmrc or authentication is missing.","error":"Error: Cannot find module '@betterdiscordbuilder/bdbuilder'"},{"fix":"Use import statement instead of require().","cause":"Using CommonJS require() on an ESM-only package.","error":"ERR_REQUIRE_ESM"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}