fix(readme): document maxLineLength option for base64ts output and add example and tip

This commit is contained in:
2026-01-12 02:03:38 +00:00
parent b3080023ab
commit 4349571112
3 changed files with 13 additions and 2 deletions

View File

@@ -91,6 +91,7 @@ tsbundle uses `npmextra.json` for configuration. Here's an example:
| `bundler` | `"esbuild"` \| `"rolldown"` \| `"rspack"` | `"esbuild"` | Which bundler to use |
| `production` | `boolean` | `false` | Enable minification |
| `includeFiles` | `string[]` | `[]` | Glob patterns for additional files (HTML, assets) |
| `maxLineLength` | `number` | `0` (unlimited) | For `base64ts` mode: max chars per line in output |
### Output Modes
@@ -108,6 +109,8 @@ export const files: { path: string; contentBase64: string }[] = [
];
```
**Tip:** If you're working with AI tools that have line length limitations, set `maxLineLength` (e.g., `200`) to split long base64 strings across multiple lines.
## Available Bundlers 🔧
tsbundle supports three modern bundlers:
@@ -241,7 +244,8 @@ Config:
"outputMode": "base64ts",
"bundler": "esbuild",
"production": true,
"includeFiles": ["./html/index.html"]
"includeFiles": ["./html/index.html"],
"maxLineLength": 200
}
]
}