// ██████╗ ███████╗██╗ ██╗███████╗██╗ ██████╗ ██████╗ // ██╔══██╗██╔════╝██║ ██║██╔════╝██║ ██╔═══██╗██╔══██╗ // ██║ ██║█████╗ ██║ ██║█████╗ ██║ ██║ ██║██████╔╝ // ██║ ██║██╔══╝ ╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║██╔═══╝ // ██████╔╝███████╗ ╚████╔╝ ███████╗███████╗╚██████╔╝██║ // ╚═════╝ ╚══════╝ ╚═══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═╝ // MIT License (c) 2020–present Cezar Augusto & the Extension.js authors, presence implies inheritance import type { LoaderContext as RspackLoaderContext, RspackPluginInstance } from '@rspack/core' import type {LogContext} from './dev-server/control-bridge/contracts' /** * Firefox-only `theme_experiment` manifest key. * Not present in `@types/chrome`; declared here so the manifest pipeline can * read it type-safely instead of casting `manifest as any`. * @see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/theme_experiment */ export interface ThemeExperiment { stylesheet?: string stylesheets?: string[] // Firefox also allows colors/images/properties maps; kept open for forward-compat. [key: string]: unknown } // Omit would drop every named key here, since ManifestBase carries a string // index signature, so the key is removed with a remapped mapped type instead. type WithoutManifestVersion = { [K in keyof T as Exclude]: T[K] } export type ChromeManifest = WithoutManifestVersion< Partial > & WithoutManifestVersion> & { // Intersecting the two Partials collapses manifest_version to never, so // it is declared once here with the two values the engine accepts. manifest_version?: 2 | 3 browser_action?: { theme_icons?: ThemeIcon[] } // Firefox supports theme_icons on the MV3 action (light/dark toolbar // icons), which @types/chrome does not model. action?: chrome.runtime.ManifestV3['action'] & { theme_icons?: ThemeIcon[] } // Extension.js augments the standard omnibox shape with a `default_icon` // (string path or per-size record), which `@types/chrome` does not model. omnibox?: { keyword?: string default_icon?: string | Record } // Firefox-only theming key (absent from `@types/chrome`). theme_experiment?: ThemeExperiment } export type Manifest = ChromeManifest export interface ThemeIcon { light: string dark: string size?: number } export type PluginInterface = { manifestPath: string browser?: DevOptions['browser'] includeList?: FilepathList /** The HTML page entries of this build, for a step that reads page scripts. */ pageList?: FilepathList transpilePackages?: string[] /** * Compile-time constants, each value JSON-serialized into the bundle the * way Vite does it. `browser..define` adds to or overrides the * top-level map for that browser. */ define?: Record /** True inside `extension dev`: the one axis that turns dev instrumentation * (dev CSP, injected permissions, reload client, page HMR) on. A build in * development mode is shippable and keeps the author's manifest. */ devSession?: boolean } export interface LoaderInterface extends RspackLoaderContext { manifestPath: string includeList?: FilepathList } export type FilepathList = Record export type ResourceType = | 'script' | 'css' | 'html' | 'static' | 'staticSrc' | 'staticHref' | 'empty' export interface LoaderContext { resourcePath: string emitFile: (name: string, content: string) => void emitWarning?: (error: Error | string) => void getOptions: () => { test: string manifestPath: string browser?: DevOptions['browser'] includeList?: FilepathList mode: string } } export interface JsFramework { plugins: RspackPluginInstance[] | undefined loaders: Record[] | undefined alias: Record | undefined } import type {Configuration} from '@rspack/core' import type {SafariPackageSummary} from './lib/build-summary' import type {CompanionExtensionsConfig} from './plugin-special-folders/folder-extensions/types' export type BrowserType = | 'chrome' | 'edge' | 'firefox' | 'chromium' | 'brave' | 'opera' | 'vivaldi' | 'yandex' | 'waterfox' | 'librewolf' | 'zen' | 'floorp' | 'chromium-based' | 'gecko-based' | 'firefox-based' | 'safari' | 'webkit-based' | 'chromium-emulator' export interface BrowserOptionsBase { noOpen?: boolean profile?: string | false /** * Opt-in persistent managed profile for development. * Defaults to false (ephemeral temp profiles are used). */ persistProfile?: boolean /** * Keep the managed profile and its changes across runs (persistent `dev` * profile, skipped by cleanup). Seeded once when combined with * `copyFromProfile`. */ keepProfileChanges?: boolean /** * Seed the managed profile as a copy of this profile directory on first * creation. */ copyFromProfile?: string startingUrl?: string browser: BrowserType } export interface ChromiumOptions extends BrowserOptionsBase { browser: 'chromium-based' chromiumBinary?: string } export interface GeckoOptions extends BrowserOptionsBase { browser: 'gecko-based' geckoBinary?: string } export interface SafariOptions extends BrowserOptionsBase { browser: 'webkit-based' safariBinary?: string /** Override the Safari app name (defaults to the manifest name). */ appName?: string /** User-owned bundle identifier (defaults to a dev.extensionjs.* id). */ bundleId?: string developmentTeam?: string /** Generate the macOS-only Xcode project (default true). */ macOsOnly?: boolean /** * A square PNG (1024 px) the Safari app's icon set is made from, relative to * the project. Unset, Apple's converter builds it from the manifest icons. */ appIcon?: string /** Regenerate the Xcode project even when its fingerprint is current. */ forceRegenerate?: boolean } /** * Safari identity/packaging options resolved by develop (CLI flags merged * with extension.config.js `browser.safari`) and forwarded to the packager * the CLI injects. */ export interface SafariPackagerOverrides { appName?: string bundleId?: string developmentTeam?: string macOsOnly?: boolean /** Absolute path of the PNG the app icon set is made from. */ appIcon?: string forceRegenerate?: boolean safariBinary?: string /** When set, overrides the factory `noOpen` for this packaging call. */ noOpen?: boolean /** Opened in the automation window once the dev session holds one. */ startingUrl?: string } /** * The packaging callback develop calls once the Safari dist is on disk. The * CLI injects `createSafariPackager()` from `extension/browsers`; a library * caller must inject the same thing or no Safari app is produced at all. * Returning a summary is optional so older packagers keep type-checking. */ export type SafariPackagerFn = ( distPath: string, mode: 'full' | 'resync', overrides?: SafariPackagerOverrides ) => Promise export interface NonBinaryOptions extends BrowserOptionsBase { browser: Exclude< BrowserType, 'chromium-based' | 'gecko-based' | 'webkit-based' > } export interface DevOptions extends BrowserOptionsBase { mode: 'development' | 'production' | 'none' polyfill?: boolean port?: string | number | undefined /** * Host to bind the dev server to. * Use '0.0.0.0' for Docker/devcontainer environments. * Defaults to '127.0.0.1'. */ host?: string /** * Connectable host the browser (HMR client + control-bridge producer) dials, * when it differs from the bind `host` (e.g. a remote/devcontainer). Defaults * to the bind host, or 127.0.0.1 when bound to a wildcard like '0.0.0.0'. */ publicHost?: string /** * Extra Host names the dev server answers, beyond localhost, IP literals and * `publicHost` (a docker service name, a tunnel, a *.local name). A comma * list or an array. A leading dot allows every subdomain. */ allowedHosts?: string | string[] install?: boolean /** * Companion extensions (load-only) for this command. */ extensions?: CompanionExtensionsConfig /** * Skip launching the browser (dev server still starts). */ noBrowser?: boolean preferences?: Record browserFlags?: string[] excludeBrowserFlags?: string[] chromiumBinary?: ChromiumOptions['chromiumBinary'] geckoBinary?: GeckoOptions['geckoBinary'] firefoxBinary?: GeckoOptions['geckoBinary'] safariBinary?: SafariOptions['safariBinary'] zip?: boolean zipSource?: boolean zipFilename?: string zipDir?: string sourceMaps?: boolean logLevel?: 'off' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'all' logContexts?: LogContext[] logFormat?: 'pretty' | 'json' | 'ndjson' logTimestamps?: boolean logColor?: boolean logUrl?: string logTab?: number | string hashContentScripts?: boolean /** * Open the agent-bridge control channel for the bounded act verbs * (storage/reload/open). The CLI sets this from `--allow-control`. */ allowControl?: boolean /** * Additionally allow the `eval` verb, which runs arbitrary code inside a * context and writes a 0600 session token. Implies `allowControl`, since * eval is strictly stronger. The CLI sets this from `--allow-eval`. */ allowEval?: boolean // When true, a failed dev session calls process.exit(1) (CLI wrapper passes // this); defaults to false: as a library, a failure is a rejected promise. exitOnError?: boolean appName?: SafariOptions['appName'] bundleId?: SafariOptions['bundleId'] developmentTeam?: SafariOptions['developmentTeam'] macOsOnly?: SafariOptions['macOsOnly'] appIcon?: SafariOptions['appIcon'] forceRegenerate?: boolean safariPackager?: SafariPackagerFn } export interface BuildOptions { browser: BrowserOptionsBase['browser'] /** * Base folder for the build output, relative to the project root. The * build writes `/` instead of `dist/`, zip * included, so it can run beside a dev session that serves `dist`. */ outDir?: string chromiumBinary?: ChromiumOptions['chromiumBinary'] geckoBinary?: GeckoOptions['geckoBinary'] firefoxBinary?: GeckoOptions['geckoBinary'] safariBinary?: SafariOptions['safariBinary'] /** * Companion extensions (load-only) for this command. */ extensions?: CompanionExtensionsConfig zipFilename?: string /** * Folder the archives are written to, relative to the project root or * absolute. Defaults to the folder that holds the browser output, `dist`. * The file name and its browser suffix stay as `zipFilename` sets them. */ zipDir?: string zip?: boolean zipSource?: boolean /** * Write a `.map` file beside each script and stylesheet of a production * build. The maps stay out of the zip. Defaults to `false`. */ sourceMaps?: boolean polyfill?: boolean silent?: boolean /** * Run Mozilla's addons-linter over the emitted dist after a production * build for a Gecko target and print its findings as build warnings. * Needs `addons-linter` installed in the project. Defaults to `true`. */ addonLint?: boolean /** * Minify first-party code in production builds. Defaults to `true` for * every target but `opera`, whose store reviews readable source only. */ minify?: boolean /** * Override the bundler mode (and NODE_ENV). Defaults to 'production' to * preserve historical behavior. Setting 'development' is useful for * staging/QA dists that should still pass through the bundler's debug * pipeline (sourcemaps, looser minification). Mirrors `vite build --mode` * and `webpack --mode`. The artifact stays shippable: it carries the * author's CSP and permissions, no reload client, and its zip holds no * maps. Only `extension dev` turns the dev instrumentation on. */ mode?: 'development' | 'production' | 'none' /** * [internal] Auto-install project dependencies when missing. */ install?: boolean failOnWarning?: boolean // When true, a failed build calls process.exit(1) (CLI wrapper passes this); // defaults to false: as a library, a failed build is a rejected promise. exitOnError?: boolean /** * Internal: the command stamped into ready.json/events.ndjson. Defaults to * 'build'; `extension start` passes 'start' for its build phase so the * receipt names the command the user actually ran. */ metadataCommand?: 'dev' | 'start' | 'preview' | 'build' /** * Internal: `extension start` sets it when a browser launch follows the * build, so the receipt stays `starting` with `compiledAt` set and only * the launch phase stamps `ready`. */ launchFollows?: boolean appName?: SafariOptions['appName'] bundleId?: SafariOptions['bundleId'] developmentTeam?: SafariOptions['developmentTeam'] macOsOnly?: SafariOptions['macOsOnly'] appIcon?: SafariOptions['appIcon'] forceRegenerate?: boolean safariPackager?: SafariPackagerFn } export interface PreviewOptions extends BrowserOptionsBase { mode: 'production' outputPath?: string /** * Internal metadata command override used by start->preview delegation. * (Full command union so the WebpackConfigOptions intersection with * BuildOptions.metadataCommand doesn't narrow the field.) */ metadataCommand?: 'dev' | 'start' | 'preview' | 'build' chromiumBinary?: ChromiumOptions['chromiumBinary'] geckoBinary?: GeckoOptions['geckoBinary'] firefoxBinary?: GeckoOptions['geckoBinary'] /** * Companion extensions (load-only) for this command. */ extensions?: CompanionExtensionsConfig /** * Skip launching the browser (no preview window). */ noBrowser?: boolean /** * Open the agent-bridge control channel on the production run, so the act * verbs (storage/reload/open) reach it. The browser loads a copy of the * build with the control producer prepended; dist/ stays the shipped bytes. * The CLI sets this from `start --allow-control`. */ allowControl?: boolean /** * Additionally allow `eval` on the production run. Implies `allowControl`. * The CLI sets this from `start --allow-eval`. */ allowEval?: boolean /** * Internal auto-generated instance ID, not user-configurable. */ instanceId?: string /** * Internal: true when the instance ID came from the user, not autogenerated. */ instanceExplicit?: boolean /** * Dry run mode (no browser launch) for diagnostics. */ dryRun?: boolean // Port forwarding to browser runner (e.g., debugging/logging server) port?: string | number /** * Host to bind the dev server to. * Use '0.0.0.0' for Docker/devcontainer environments. * Defaults to '127.0.0.1'. */ host?: string /** * Accepted so a config or flag shared with `dev` keeps working. Nothing is * served by this command, so there is no connectable host to override. */ publicHost?: string logLevel?: 'off' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'all' logContexts?: LogContext[] logFormat?: 'pretty' | 'json' | 'ndjson' logTimestamps?: boolean logColor?: boolean logUrl?: string logTab?: number | string } export interface StartOptions extends BrowserOptionsBase { mode: 'production' polyfill?: boolean chromiumBinary?: ChromiumOptions['chromiumBinary'] geckoBinary?: GeckoOptions['geckoBinary'] firefoxBinary?: GeckoOptions['geckoBinary'] /** * Companion extensions (load-only) for this command. */ extensions?: CompanionExtensionsConfig /** * [internal] Auto-install project dependencies when missing. */ install?: boolean /** * Skip launching the browser (build still runs). */ noBrowser?: boolean // Port forwarding to browser runner (e.g., debugging/logging server) port?: string | number /** * Host to bind the dev server to. * Use '0.0.0.0' for Docker/devcontainer environments. * Defaults to '127.0.0.1'. */ host?: string /** * Accepted so a config or flag shared with `dev` keeps working. Nothing is * served by this command, so there is no connectable host to override. */ publicHost?: string logLevel?: 'off' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'all' logContexts?: LogContext[] logFormat?: 'pretty' | 'json' | 'ndjson' logTimestamps?: boolean logColor?: boolean logUrl?: string logTab?: number | string } export interface BrowserConfig extends BrowserOptionsBase { browserFlags?: string[] excludeBrowserFlags?: string[] preferences?: Record chromiumBinary?: ChromiumOptions['chromiumBinary'] geckoBinary?: GeckoOptions['geckoBinary'] firefoxBinary?: GeckoOptions['geckoBinary'] safariBinary?: SafariOptions['safariBinary'] appName?: SafariOptions['appName'] bundleId?: SafariOptions['bundleId'] developmentTeam?: SafariOptions['developmentTeam'] macOsOnly?: SafariOptions['macOsOnly'] appIcon?: SafariOptions['appIcon'] forceRegenerate?: SafariOptions['forceRegenerate'] /** Where the special folders live for this browser, or `false` to skip one. */ folders?: SpecialFoldersConfig /** Extra files for this browser's output, added to the top-level `include`. */ include?: IncludeFilesConfig /** Files this browser's build leaves out, added to the top-level `exclude`. */ exclude?: ExcludeFilesConfig /** * Companion extensions (load-only) scoped to a browser config. * Useful for per-browser store URLs or local unpacked extensions. */ extensions?: CompanionExtensionsConfig } export type OutputConfig = { clean: boolean path: string /** * Internal: the final dist path when `path` points at the staging * directory a one-shot build is later promoted from. Metadata surfaces * (ready.json) advertise this path, never the staging directory. */ finalPath?: string } /** * Per-category asset size budgets (bytes) for the perf-budgets plugin, plus * `ignore`, the output paths no budget applies to (exact, or `*` and `**` * globs). A `.wasm` file only pages and workers reach is budgeted as `wasm` * (32 MiB); one a content script or the service worker reaches stays * `runtime` (1 MiB). Set at the top level of extension.config.js (weakest), * under `browser..perfBudgets`, or per command via * `commands.dev.perfBudgets` / `commands.build.perfBudgets` (strongest * below a CLI flag). */ export type PerfBudgetsConfig = import('./plugin-perf-budgets').PerfBudgetsConfig export interface CommonWebpackOptions { output: OutputConfig preferences?: Record browserFlags?: string[] excludeBrowserFlags?: string[] /** * Workspace/dependency packages that should be transpiled from source. * Useful for monorepos where package exports point to TS/TSX files. */ transpilePackages?: string[] /** * Compile-time constants, each value JSON-serialized into the bundle. */ define?: Record folders?: SpecialFoldersConfig include?: IncludeFilesConfig exclude?: ExcludeFilesConfig perfBudgets?: PerfBudgetsConfig /** * Companion extensions (load-only). Each entry must be an unpacked extension root * containing a manifest.json. These are loaded alongside the user extension in * dev/preview/start (and can also be applied to build for packaging scenarios). */ extensions?: CompanionExtensionsConfig /** * Internal auto-generated instance ID, not user-configurable */ instanceId?: string /** * Agent-bridge control channel. Injected by dev-server so the * PlaywrightPlugin can advertise them in ready.json. Not user-configurable. */ controlPort?: number | null controlPortUnavailableReason?: string | null controlPath?: string logsPath?: string /** * Set by dev-server when act verbs are allowed and a browser launch * follows, so ready.json waits for the background to connect. */ readyAwaitsExecutor?: boolean } /** * Canonical options type for webpack-config consumers. * Accepts any of the command option fields (dev/preview/start/build), * while requiring browser and mode, and the common output settings. * * `mode` is omitted from the partial intersection because PreviewOptions * and StartOptions narrow it to `'production'`. Without the omit the * outer override below becomes ineffective: TypeScript intersects the * outer `'development' | 'production' | 'none'` with the inner * `'production'` and the input is locked back to `'production'`. */ export type WebpackConfigOptions = CommonWebpackOptions & Omit< Partial, 'mode' > & { browser: BrowserType mode: 'development' | 'production' | 'none' // Injected by command-dev: the browser-runner plugin (Chromium/Firefox // launcher or the Safari packager). Both implement RunnerPlugin. browsersPlugin?: import('./plugin-browsers').RunnerPlugin } export interface FileConfig { browser?: { [K in BrowserType]?: BrowserConfig } commands?: { dev?: Pick< DevOptions, | 'profile' | 'chromiumBinary' | 'geckoBinary' | 'safariBinary' | 'appName' | 'bundleId' | 'developmentTeam' | 'macOsOnly' | 'appIcon' | 'forceRegenerate' | 'noOpen' | 'noBrowser' | 'polyfill' > & Pick< DevOptions, | 'logLevel' | 'logContexts' | 'logFormat' | 'logTimestamps' | 'logColor' | 'logUrl' | 'logTab' | 'hashContentScripts' > & { // Optional like every key here: the target can come from the flag. browser?: BrowserType browserFlags?: string[] excludeBrowserFlags?: string[] preferences?: Record persistProfile?: boolean extensions?: CompanionExtensionsConfig transpilePackages?: string[] define?: Record folders?: SpecialFoldersConfig include?: IncludeFilesConfig exclude?: ExcludeFilesConfig perfBudgets?: PerfBudgetsConfig } start?: Pick< StartOptions, | 'profile' | 'chromiumBinary' | 'geckoBinary' | 'polyfill' | 'noBrowser' | 'port' | 'host' | 'publicHost' | 'logLevel' | 'logContexts' | 'logFormat' | 'logTimestamps' | 'logColor' | 'logUrl' | 'logTab' > & { browser?: BrowserType browserFlags?: string[] excludeBrowserFlags?: string[] preferences?: Record persistProfile?: boolean extensions?: CompanionExtensionsConfig transpilePackages?: string[] define?: Record folders?: SpecialFoldersConfig include?: IncludeFilesConfig exclude?: ExcludeFilesConfig } preview?: Pick< PreviewOptions, | 'profile' | 'chromiumBinary' | 'geckoBinary' | 'noBrowser' | 'port' | 'host' | 'publicHost' | 'logLevel' | 'logContexts' | 'logFormat' | 'logTimestamps' | 'logColor' | 'logUrl' | 'logTab' > & { browser?: BrowserType browserFlags?: string[] excludeBrowserFlags?: string[] preferences?: Record persistProfile?: boolean extensions?: CompanionExtensionsConfig transpilePackages?: string[] define?: Record folders?: SpecialFoldersConfig } build?: Pick< BuildOptions, | 'outDir' | 'zipFilename' | 'zipDir' | 'zip' | 'zipSource' | 'sourceMaps' | 'polyfill' | 'silent' | 'addonLint' | 'minify' | 'safariBinary' | 'appName' | 'bundleId' | 'developmentTeam' | 'macOsOnly' | 'appIcon' | 'forceRegenerate' > & { browser?: BrowserType extensions?: CompanionExtensionsConfig transpilePackages?: string[] define?: Record folders?: SpecialFoldersConfig include?: IncludeFilesConfig exclude?: ExcludeFilesConfig perfBudgets?: PerfBudgetsConfig } } /** * Companion extensions (load-only) applied to commands unless overridden per-command. * This is merged into `commands.dev|start|preview|build` by the config loader. */ extensions?: CompanionExtensionsConfig /** * Default transpile allowlist for all commands, the weakest layer. * `browser..transpilePackages` overrides it, and per-command * `commands..transpilePackages` overrides both. */ transpilePackages?: string[] /** * Compile-time constants for every command, each value JSON-serialized * into the bundle the way Vite's define does it. `browser..define` * adds to or overrides it for that browser. */ define?: Record /** * Default per-category asset budgets for all commands, the weakest layer. * `browser..perfBudgets` overrides it, and per-command * `commands.dev|build.perfBudgets` overrides both. */ perfBudgets?: PerfBudgetsConfig /** * Where the special folders live. A path points at a folder named like the * default (`src/scripts`), `false` turns the folder off. The weakest layer, * `browser..folders` and `commands..folders` override it. */ folders?: SpecialFoldersConfig /** * Extra files copied into the output, keyed by their output path, for * example `{'models/x.onnx': './models/x.onnx'}`. A source can be a file * or a folder, inside or outside the project. `browser..include` * adds to or overrides it, and `commands..include` adds to both. */ include?: IncludeFilesConfig /** * Files the build leaves out, each relative to the project root, for * example `['pages/offscreen.html']`. A page or script named here gets no * entry and emits nothing, a public file named here is not copied. * `browser..exclude` and `commands..exclude` add to it. */ exclude?: ExcludeFilesConfig /** * Customizes the bundler config before the compiler is built. The second * argument names the target browser, the bundler mode and the command. */ config?: (config: Configuration, context: ConfigHookContext) => Configuration /** * Runs once the bundler config is final, right before the first build, with * every loader rule attached. It can change `module`, `resolve`, * `resolveLoader`, `node`, `optimization.minimize`, `optimization.minimizer` * and the `output` options read at build time, such as file names and * `environment`. Every other key is fixed by then (`entry`, `plugins`, * `mode`, `devtool`, `target`, `externals`, `output.path`, the rest of * `optimization`): a change is ignored with a warning, use `config`. * The second argument is the same context `config` receives. */ configResolved?: ( config: Configuration, context: ConfigHookContext ) => Configuration | undefined | Promise } /** What the `config` and `configResolved` hooks are told about the run. */ export interface ConfigHookContext { browser: BrowserType mode: 'development' | 'production' | 'none' command: 'dev' | 'build' | 'start' | 'preview' /** * The bundler this run compiles with, so a hook reaches `ProvidePlugin` * or `NormalModuleReplacementPlugin` with no bundler of the project's own. */ rspack: typeof import('@rspack/core').rspack } export interface SpecialFoldersConfig { scripts?: string | false pages?: string | false public?: string | false } /** * One `include` source in its long form. `minify: false` ships a script as * authored where a production build would minify it. */ export interface IncludeFileEntry { /** The source path, relative to the project root. */ from: string /** * Minify a `.js`, `.mjs` or `.cjs` source in a production build. Names * are shortened and comments dropped, and no statement is rewritten. * Defaults to `true`. */ minify?: boolean } /** * Extra files for the build output. Each key is the output path, relative * to the extension root, and each value the source path, relative to the * project root, or `{from, minify}`. A folder source copies its tree under * the output path. A production build minifies the scripts among them. */ export type IncludeFilesConfig = Record /** * Files the build leaves out, each relative to the project root. A page or * script in a special folder named here gets no entry, a public file named * here is not copied. The lists of every config layer add up. */ export type ExcludeFilesConfig = string[]