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-screepsVerified import paths — ran on the pinned version, not inferred.
Configures rollup-plugin-screeps to upload compiled output to Screeps using credentials from screeps.json, with source maps enabled.
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.
Use import syntax instead of require(). Update your rollup config to ESM.
Switch to dynamic import() or use a CommonJS wrapper like import().default.
Set sourcemap: true in the output configuration of rollup.config.js.
Explicitly set branch string in screeps.json if git is not guaranteed available.
Run npm install --save-dev rollup-plugin-screeps in the project directory.
Change to import screeps from 'rollup-plugin-screeps' and ensure rollup.config.js uses .mjs extension or nearest package.json has "type": "module".
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.