Registry / devops / esbuild-bitburner-plugin

esbuild-bitburner-plugin

JSON →
library1.7.9jsnpmunverified

An ESBuild plugin (v1.7.9) that uses Bitburner's Remote API to push compiled build results directly into the game. It supports automatic file uploading, file mirroring for bidirectional sync, and distribution of scripts to multiple servers. Key differentiators: seamless integration with the Bitburner editor, support for React with ingame React/ReactDOM instances, and optional Netscript definitions generation. This plugin is actively maintained and requires Node >=20.0.0.

devopshttp-networking
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ESM-only; CommonJS require() will fail with the default export.

import { BitburnerPlugin } from 'esbuild-bitburner-plugin'

For dynamic imports, use ESM dynamic import.

const { BitburnerPlugin } = await import('esbuild-bitburner-plugin')

The default export is the plugin function; the named export is also available.

import BitburnerPlugin from 'esbuild-bitburner-plugin'

Sets up an ESBuild context with the Bitburner plugin to watch and auto-upload scripts to the game.

import { context } from 'esbuild'; import { BitburnerPlugin } from 'esbuild-bitburner-plugin'; const createContext = async () => { return await context({ entryPoints: ['servers/**/*.js', 'servers/**/*.ts'], outbase: './servers', outdir: './build', plugins: [BitburnerPlugin({ port: 12525, types: 'NetscriptDefinitions.d.ts', })], bundle: true, format: 'esm', platform: 'browser', logLevel: 'info', }); }; const ctx = await createContext(); ctx.watch();
Debug
Known footguns
gotchaPlugin only works with esbuild's context() API; using build() directly will not trigger uploads.
breakingNode.js >=20.0.0 is required; older versions will cause runtime errors.
gotchaFile structure in outdir determines target server; e.g., build/home/foo.js uploads to home server.
deprecatedThe 'types' option may be renamed in future versions; check migration guides.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
13 hits · last 30 days
gptbot
3
ahrefsbot
3
amazonbot
3
claudebot
3
bingbot
1
Resources