feat(includeFiles): support {from, to} object form for custom serve paths

includeFiles now accepts string | {from, to} entries. The object form
allows specifying a custom serve path (e.g. ./html/index.html -> index.html)
for base64ts bundled content.
This commit is contained in:
2026-02-24 17:02:46 +00:00
parent 801cab9001
commit 12c5655251
4 changed files with 32 additions and 9 deletions

View File

@@ -17,13 +17,15 @@ export interface IEnvTransportOptions {
export type TOutputMode = 'bundle' | 'base64ts';
export type TBundler = 'esbuild' | 'rolldown' | 'rspack';
export type TIncludeFile = string | { from: string; to: string };
export interface IBundleConfig {
from: string;
to: string;
outputMode?: TOutputMode;
bundler?: TBundler;
production?: boolean;
includeFiles?: string[];
includeFiles?: TIncludeFile[];
maxLineLength?: number; // For base64ts output: max chars per line. 0 or undefined = unlimited (default)
}