fix: shard unnamed modules into __unmapped/NNxxx to avoid GitHub 1000-file truncation
This commit is contained in:
parent
3067006c7b
commit
e6e9c1ada1
1 changed files with 3 additions and 1 deletions
|
|
@ -56,8 +56,10 @@ export default async function code(progress: Progress, _code: string[]) {
|
|||
if (id !== undefined) {
|
||||
const sourcePath = modulePaths.get(id);
|
||||
if (sourcePath) return sanitizePath(sourcePath);
|
||||
const bucket = Math.floor(id / 1000);
|
||||
return `__unmapped/${String(bucket).padStart(2, "0")}xxx/${relativePath}`;
|
||||
}
|
||||
return relativePath;
|
||||
return `__unmapped/${relativePath}`;
|
||||
}
|
||||
|
||||
const files = new Map<string, number>();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue