fix(cli): deduplicate Node asset destinations (#39900)
This commit is contained in:
parent
dc3c996892
commit
6c37842520
2 changed files with 20 additions and 2 deletions
|
|
@ -58,8 +58,9 @@ export async function collectNodeAssets(target: NodeTarget) {
|
|||
source: path.join(ptyRoot, relative),
|
||||
})),
|
||||
]
|
||||
await Promise.all(assets.map((asset) => stat(asset.source)))
|
||||
return assets
|
||||
const unique = [...new Map(assets.map((asset) => [asset.key, asset])).values()]
|
||||
await Promise.all(unique.map((asset) => stat(asset.source)))
|
||||
return unique
|
||||
}
|
||||
|
||||
export async function hashNodeAssets(assets: readonly NodeAsset[]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue