Config-based Entry
When configuring with entry and manifest in addfox.config.ts, you can:
- Customize entry paths
- Override auto-discovery results
- Add custom entries (e.g.,
capture,my-page)
Entries not listed in entry will still be auto-discovered via file-based rules.
Core Principles
Consistent with file-based entries:
- Entries must be JS/TS: Built on Rsbuild, real entries can only be script files
- HTML handling: Built-in HTML entries (popup/options, etc.) auto-generate; when using custom HTML templates, must mark entry script with
data-addfox-entry
Configuration Methods
1) Configure via entry
entry is an object: key = entry name, value = path or config object.
2) Configure entry-related fields via manifest
In manifest, declare entry-related capability fields (e.g., background, action.default_popup, content_scripts):
3) Priority between entry and manifest
When both participate in entry resolution, the priority is:
- Explicit configuration in
entry - Entry-related fields in
manifest - Auto-discovery (file-based)
That is: entry will override entries from other sources with the same name.
String path (recommended)
Value is a path relative to baseDir (default app/):
Object form: { src, html? }
More fine-grained control:
Built-in Entries and Output Paths
When configuring built-in entries via entry, default output paths are as follows:
In the manifest, the framework automatically fills action.default_popup, options_page, and other fields with the above paths.
Configuration Examples
Override some entries
Configure all entries completely
Custom entry + force HTML generation
Disable entry auto-discovery
If you need full manual control of all entries:
Path Resolution Rules
Relative to baseDir
All paths in entry are relative to baseDir, where baseDir is determined by appDir (default app):
Path Quick Reference
Next Steps
- File-based Entry — Learn auto-discovery rules
- appDir configuration — Modify source directory
- manifest configuration — Configure extension manifest

