Compare commits

...

2 Commits

Author SHA1 Message Date
801cab9001 v2.8.3
Some checks failed
Default (tags) / security (push) Successful in 31s
Default (tags) / test (push) Failing after 35s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-01-23 19:12:30 +00:00
971cb685a7 fix(mod_output): use pattern base dir when computing relative paths for files to serve 2026-01-23 19:12:30 +00:00
4 changed files with 10 additions and 3 deletions

View File

@@ -1,5 +1,11 @@
# 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

View File

@@ -1,6 +1,6 @@
{
"name": "@git.zone/tsbundle",
"version": "2.8.2",
"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",

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tsbundle',
version: '2.8.2',
version: '2.8.3',
description: 'a multi-bundler tool supporting esbuild, rolldown, and rspack for painless bundling of web projects'
}

View File

@@ -60,7 +60,8 @@ export class Base64TsOutput {
const fullPath = plugins.path.isAbsolute(entry.path)
? entry.path
: plugins.path.join(dirPath, entry.path);
const relativePath = plugins.path.relative(this.cwd, fullPath);
// 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);
}