Repository navigation
rsbuild
@sysce/estrogen/rsbuild is an rsbuild plugin that runs estrogen after the build, over
the resolved dist path.
// rsbuild.config.ts
import { defineConfig } from '@rsbuild/core';
import { pluginEstrogen } from '@sysce/estrogen/rsbuild';
export default defineConfig({
plugins: [pluginEstrogen()],
});pluginEstrogen(options?): RsbuildPlugin is a named export. It runs after the build
over the dist path rsbuild resolved. If any file fails, the build fails: estrogen
fails closed and writes no partial output for a failing file.
Pass the Node API options object to override what the plugin infers.
It infers dirs from the dist path, so you usually set only the per-site data
files:
plugins: [pluginEstrogen({ config: 'estrogen.toml' })];See Configuration for the config file.
estrogen is not idempotent. The plugin runs once per build. Do not add it twice, and confirm a watch rebuild writes a fresh dist rather than reprocessing one estrogen already rewrote.
By default estrogen writes no map and strips sourceMappingURL comments from the
chunks it processes, so the bundler's maps (which point at pre-obfuscation
source) stay out of the served output. For a private debug map, pass sourcemap
in the plugin options to write it outside the build. See
Source maps.
@sysce/estrogen ·
Fracital/estrogen · ISC · by David Reed.
estrogen raises the cost of reading a build; it does not make it secret.