diff --git a/patches/@yao-pkg+pkg+5.12.0.patch b/patches/@yao-pkg+pkg+5.12.0.patch index 6926a98..d385f96 100644 --- a/patches/@yao-pkg+pkg+5.12.0.patch +++ b/patches/@yao-pkg+pkg+5.12.0.patch @@ -1,15 +1,19 @@ diff --git a/node_modules/@yao-pkg/pkg/prelude/bootstrap.js b/node_modules/@yao-pkg/pkg/prelude/bootstrap.js -index fa65407..3f0e9f6 100644 +index fa65407..42d1aa1 100644 --- a/node_modules/@yao-pkg/pkg/prelude/bootstrap.js +++ b/node_modules/@yao-pkg/pkg/prelude/bootstrap.js -@@ -2239,6 +2239,11 @@ function payloadFileSync(pointer) { +@@ -2239,6 +2239,15 @@ function payloadFileSync(pointer) { } else { const tmpModulePath = path.join(tmpFolder, moduleBaseName); + // here we copy all files from the snapshot module folder to temporary folder + // we keep the module folder structure to prevent issues with modules that are statically + // linked using relative paths -+ copyFolderRecursiveSync(moduleFolder, tmpFolder); ++ for (const file of fs.readdirSync(moduleFolder)) { ++ const src = path.join(moduleFolder, file); ++ const dest = path.join(tmpFolder, file); ++ fs.copyFileSync(src, dest) ++ } + if (!fs.existsSync(tmpModulePath)) { fs.copyFileSync(modulePath, tmpModulePath);