tamer-plugin
Rsbuild plugin that loads tamer.config from the project and workspace packages, then applies nested plugins.
Overview
- Reads
tamer.config.json,tamer.config.ts,tamer.config.mjs, ortamer.config.jsfrom project root - Falls back to workspace packages and
node_modulespackages that export./tamer.config - Merges config; options passed to
pluginTamer()override file config (exceptfalseto disable) - Runs nested Rsbuild plugins from the merged config
- Supports standard Rspeedy asset imports, CSS
url(),?url,?inline, and emitsdist/tamer-assets.json
Installation
Usage
API
pluginTamer(options?)
TamerPluginOptions is Record<string, boolean | Record<string, unknown> | RsbuildPlugin>. Values can be:
RsbuildPlugin— setup is calledfalse— disables that key from file config- Other — overrides file config for that key
Assets
Rspeedy asset imports remain URL strings, so direct usage works across React, Vue-Lynx, and other Lynx bindings:
Use the optional shim when you want asset metadata:
pluginTamer() emits tamer-assets.json during build for diagnostics and preload metadata. t4l bundle / t4l build copies the full dist tree into native hosts, including static/; native loading is owned by tamer-host, tamer-dev-client, tamer-dev-app, and CLI-generated host templates.
tamer.config format
Export an object (default or tamerDefaults) with keys such as:
rsbuildConfig— partial Rsbuild config (e.g.source.preEntry)- Plugin keys — e.g.
tamerRouterfor tamer-router's plugin
Example tamer.config.ts:
