Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 801cab9001 | |||
| 971cb685a7 | |||
| 0900d1a605 | |||
| f0fb99c8ae |
13
changelog.md
13
changelog.md
@@ -1,5 +1,18 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-01-23 - 2.8.3 - fix(mod_output)
|
||||
use pattern base dir when computing relative paths for files to serve
|
||||
|
||||
- Compute relativePath using the pattern base directory (dirPath) instead of this.cwd to ensure correct web-serving paths for absolute or relative entry.path values.
|
||||
- File changed: ts/mod_output/index.ts — replaces plugins.path.relative(this.cwd, fullPath) with plugins.path.relative(dirPath, fullPath) and adds clarifying comment.
|
||||
|
||||
## 2026-01-23 - 2.8.2 - fix(mod_output)
|
||||
resolve absolute and relative entry.path correctly when adding files
|
||||
|
||||
- Add check for plugins.path.isAbsolute(entry.path) to avoid incorrectly joining absolute paths with dirPath
|
||||
- Use entry.path directly when it's absolute, otherwise join with dirPath
|
||||
- Ensures correct relativePath calculation and prevents invalid file reads
|
||||
|
||||
## 2026-01-12 - 2.8.1 - fix(readme)
|
||||
document maxLineLength option for base64ts output and add example and tip
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@git.zone/tsbundle",
|
||||
"version": "2.8.1",
|
||||
"version": "2.8.3",
|
||||
"private": false,
|
||||
"description": "a multi-bundler tool supporting esbuild, rolldown, and rspack for painless bundling of web projects",
|
||||
"main": "dist_ts/index.js",
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tsbundle',
|
||||
version: '2.8.1',
|
||||
version: '2.8.3',
|
||||
description: 'a multi-bundler tool supporting esbuild, rolldown, and rspack for painless bundling of web projects'
|
||||
}
|
||||
|
||||
@@ -56,8 +56,12 @@ export class Base64TsOutput {
|
||||
|
||||
for (const entry of entries) {
|
||||
if (!entry.isDirectory && regex.test(entry.name)) {
|
||||
const fullPath = plugins.path.join(dirPath, entry.path);
|
||||
const relativePath = plugins.path.relative(this.cwd, fullPath);
|
||||
// entry.path may be absolute or relative - handle both cases
|
||||
const fullPath = plugins.path.isAbsolute(entry.path)
|
||||
? entry.path
|
||||
: plugins.path.join(dirPath, entry.path);
|
||||
// Use path relative to pattern's base dir (not cwd) for web serving
|
||||
const relativePath = plugins.path.relative(dirPath, fullPath);
|
||||
const content = await plugins.fs.file(fullPath).read();
|
||||
this.addFile(relativePath, content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user