Registry / devops / rollup-plugin-screeps

rollup-plugin-screeps

JSON →
library1.0.1jsnpmunverified

Rollup plugin for uploading compiled code to the Screeps MMO/private servers. Integrates directly into the Rollup build pipeline, reading credentials and server configuration from a screeps.json file. Supports automatic branch naming based on git branch, maps source files to screeps modules, and optionally uploads source maps. Current version 1.0.1 is stable with low release cadence. Alternative to grunt-screeps for projects using Rollup as bundler.

npm install rollup-plugin-screeps
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-SCRE
R
rollup-plugin-screeps
devopsjavascriptv1.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

default
import screeps from 'rollup-plugin-screeps'
const screeps = require('rollup-plugin-screeps')
ESM-only package; does not support CommonJS require.
screeps
import { screeps } from 'rollup-plugin-screeps'
import { rollupPluginScreeps } from 'rollup-plugin-screeps'
Named export not available; use default import. The named import pattern is a common mistake.
ScreepsPluginOptions
import type { ScreepsPluginOptions } from 'rollup-plugin-screeps'
TypeScript users can import the options type for typed configs.

Configures rollup-plugin-screeps to upload compiled output to Screeps using credentials from screeps.json, with source maps enabled.

// rollup.config.js import screeps from 'rollup-plugin-screeps'; export default { input: 'src/main.js', output: { dir: 'dist', format: 'esm', sourcemap: true }, plugins: [ screeps({ configFile: './screeps.json', dryRun: false }) ] };
Debug
Known issues
gotchaPlugin will fail silently if configFile path is wrong or screeps.json is malformed.
fix
Verify the configFile path is relative to the rollup config and the JSON is valid with all required fields: email, password, protocol, hostname, port, path, branch.
affects: >=1.0.0
breakingVersion 1.0.0 dropped support for CommonJS. The package is now ESM-only.
fix
Use import syntax instead of require(). Update your rollup config to ESM.
affects: >=1.0.0
deprecatedUsing require() will throw a runtime error in Node.js without ESM support.
fix
Switch to dynamic import() or use a CommonJS wrapper like import().default.
affects: >=1.0.0
gotchaIf sourcemap is not true in rollup output, the plugin will not generate or upload source maps even if configured.
fix
Set sourcemap: true in the output configuration of rollup.config.js.
affects: >=1.0.0
gotchaSetting branch to 'auto' depends on git being installed and available in the build environment; otherwise fails.
fix
Explicitly set branch string in screeps.json if git is not guaranteed available.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-screeps'
Package not installed or installed globally but not in local node_modules.
fix
Run npm install --save-dev rollup-plugin-screeps in the project directory.
TypeError: screeps is not a function
Using require() with ESM-only package.
fix
Change to import screeps from 'rollup-plugin-screeps' and ensure rollup.config.js uses .mjs extension or nearest package.json has "type": "module".
Error: Config file not found at ./screeps.json
The configFile path is incorrect or the file does not exist.
fix
Double-check the path relative to where rollup is invoked. Use absolute path or ensure screeps.json is in the same directory as rollup.config.js.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
rolluprequiredpeer dependency required as the plugin host
Agent activity
34 hits · last 30 days
node
26
OpenAI (training)
1
Resources
rollup-plugin-screeps — npm install rollup-plugin-screeps · libregistry