mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 07:30:41 +09:00
Replace webpack and Module Federation with Vite 8. The controller build emits one entry per shared module (lib, web_ui, typebox, antd, react, react-dom, react-router) and lists them in manifest.json. The controller turns that into an import map in index.html, and plugins are built as ES modules that import the shared modules by name and are loaded with import(). The shared Vite setup lives in @clusterio/web_ui/vite.mjs. Plugins use clusterioPlugin(), which exposes index, package.json and web/index under the same keys the webpack template used. The --dev and --dev-plugin flags now run the Vite dev server in middleware mode with hot module replacement. Browser polyfills move from web_ui to lib, which is the code that needs them, and lib sets the process and Buffer globals itself. Refs #1127 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clusterio Statistics Exporter Plugin
Plugin exporting item production, fluid production, kill count, entity build and pollution statistics to the Prometheus integration to Clusterio.
Installation
Run the following commands in the folder Clusterio is installed to:
npm install @clusterio/plugin-statistics_exporter
npx clusteriocontroller plugin add @clusterio/plugin-statistics_exporter
Substitute clusteriocontroller with clusteriohost or clusterioctl if this a dedicate host or ctl installation respectively.
Instance Configuration
statistics_exporter.command_timeout
Timeout in seconds to wait for the statitics gathering command to the Factorio server return the result. If the timeout is exceeded the previous collected results are returned instead. Normally the command returns immediatly with the data, but if the RCON interface is overloaded then the command may take too long to timely answer the metrics collection request.
Defaults to 1.