fix(mod_output): use pattern base dir when computing relative paths for files to serve
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user