fix(windows): skip remove locle

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei 2024-09-27 18:12:39 +08:00
parent 7305eba3fe
commit 5df82d0c0f
1 changed files with 3 additions and 1 deletions

View File

@ -80,6 +80,8 @@ async function cleanSources(buildPath, electronVersion, platform, arch, callback
callback()
}
const noopAfterCopy = (buildPath, electronVersion, platform, arch, callback) => callback()
const ignorePattern = new RegExp(`^/node_modules/(?!${[...keepModules].join("|")})`)
const config: ForgeConfig = {
@ -96,7 +98,7 @@ const config: ForgeConfig = {
afterCopy: [
cleanSources,
process.platform !== "win32" && setLanguages([...keepLanguages.values()]),
process.platform !== "win32" ? noopAfterCopy : setLanguages([...keepLanguages.values()]),
],
asar: true,
ignore: [ignorePattern],