Archibald Configuration Deep Dive
The archibald.json file is the master configuration for the build system and the CLI. It controls everything from output paths to complex optimization strategies.
info
This page explains how archibald.json influences the build internally. For the full property reference, see Archibald CLI Configuration.
1. Project Configuration (project)
template: The base template to use (e.g.,shop,basic).tenants/platforms/environments: Defines the valid context for the project. The CLI uses these lists to validate commands and provide interactive choices.rendering: Can bessr(Server Side) orcsr(Client Side).- Impact: If
ssr, the CLI builds both aserverand aclientbundle. Ifcsr, it skips the server build and optimizes for a static host.
- Impact: If
shadowing.active: Enables/disables the File Shadowing mechanism (the pre-9.1themingblock is still accepted but deprecated).shadowing.useRustShadowing: Resolves shadowing with the Rust SWC plugin instead of the Babel loader. The deprecated spellinguseRustThemingis still accepted.output.paths: Customizes where files are saved (e.g.,dist,config,swagger).
2. Optimization Settings (cli.optimization)
minify: Can betrue/'rspack'(both use the fast native SWC minifier), or'terser'.- Impact: Controls which engine performs JS minification in production.
trueand'rspack'are equivalent; only'terser'opts into the slower Terser engine. CSS is always minified with Lightning CSS.
- Impact: Controls which engine performs JS minification in production.
cacheGroups: Boolean (defaulttrue). Documented in depth only here — the general property reference lives in Archibald CLI Configuration.- Impact: If
true, the client build is split into a long-cachedframeworkchunk (React ecosystem +@archibaldpackages), a single initialvendorchunk, and the appbundle— keeping ~90% of the initial JS cached across app-only redeploys. Async island chunks stay self-contained so enabling the split does not inflate first paint.
- Impact: If
splitChunks: Optional custom RspacksplitChunksobject.- Impact: When set, it is passed to Rspack as-is for full manual control (independent of
cacheGroups).
- Impact: When set, it is passed to Rspack as-is for full manual control (independent of
compression:none,brotli,gzip, orall(defaultall).- Impact: Determines if pre-compressed
.br/.gzassets are generated for production builds.
- Impact: Determines if pre-compressed
deduplicateCriticalCSS: Boolean.- Impact: If
true, usescss-purgeduring critical CSS inlining to merge duplicate rules and reduce HTML size.
- Impact: If
preload: Boolean.- Impact: Enables the generation of resource hint tags in the HTML
<head>. (There is no separateprefetchoptimization key.)
- Impact: Enables the generation of resource hint tags in the HTML
3. Development Settings (cli.development)
hot: Host and Port for the HMR server.ssl.type:manualorautomatic.- Impact: If
automatic, the CLI will attempt to usemkcertto generate a trusted local certificate for HTTPS development.
- Impact: If
sourcemaps: Mode-based configuration (e.g.,eval-source-mapfor dev).watchOptions.ignored: Glob pattern for files that should not trigger a re-build.detachedTypechecking: Boolean.- Impact: If
true, type checking runs in a separate process, preventing compilation stalls on large projects.
- Impact: If
4. Integration Settings
serviceWorker.active: Triggers the Workbox generation pass during production builds.vercel.active: Iftrue, the build command will automatically produce a.verceloutput folder ready for deployment.
Configuration Usage Flow
The following diagram illustrates how specific parameters from archibald.json flow through the CLI and influence the three Rspack configuration layers.
Parameter-Specific Impacts
| Parameter | Configuration Impact |
|---|---|
rendering | In Base, it determines if a server bundle is needed. In Production, it affects chunk hashing. |
minify | In Production, it selects between SwcJsMinimizerRspackPlugin or TerserPlugin. |
splitChunks | In Base, it defines the framework and vendor cache groups. |
compression | In Production, it triggers the CompressionPlugin for Brotli or Gzip. |
watchOptions | In Development, it controls the speed and accuracy of the file watcher. |
keepClassnames | In Production, it ensures that class names are not mangled (required for framework DI). |