Fix copying swc binary for isolated tests locally (#32026)
This commit is contained in:
parent
494e37c026
commit
03317c7507
1 changed files with 9 additions and 8 deletions
|
@ -18,15 +18,16 @@ async function createNextInstall(dependencies) {
|
||||||
)) {
|
)) {
|
||||||
if (folder.startsWith('swc-')) {
|
if (folder.startsWith('swc-')) {
|
||||||
const swcPkgPath = path.join(origRepoDir, 'node_modules/@next', folder)
|
const swcPkgPath = path.join(origRepoDir, 'node_modules/@next', folder)
|
||||||
await fs.copy(
|
const outputPath = path.join(origRepoDir, 'packages/next-swc/native')
|
||||||
swcPkgPath,
|
await fs.copy(swcPkgPath, outputPath, {
|
||||||
path.join(origRepoDir, 'packages/next-swc/native'),
|
filter: (item) => {
|
||||||
{
|
return (
|
||||||
filter: (item) =>
|
|
||||||
item === swcPkgPath ||
|
item === swcPkgPath ||
|
||||||
(item.endsWith('.node') && !fs.pathExistsSync(item)),
|
(item.endsWith('.node') &&
|
||||||
}
|
!fs.pathExistsSync(path.join(outputPath, path.basename(item))))
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue