fix windows build (#4043)

This commit is contained in:
tlaloc911
2025-02-26 04:01:22 -06:00
committed by GitHub
parent 51eda3f08c
commit 655eec09c1

View File

@ -78,14 +78,14 @@ async function main() {
console.log('The directory has been created successfully!'); console.log('The directory has been created successfully!');
// Copy build // Copy build
await copyFolderIfExists('packages/bruno-app/out', 'packages/bruno-electron/web'); await copyFolderIfExists('packages/bruno-app/dist', 'packages/bruno-electron/web');
// Change paths in next // Change paths in next
const files = await fs.readdir('packages/bruno-electron/web'); const files = await fs.readdir('packages/bruno-electron/web');
for (const file of files) { for (const file of files) {
if (file.endsWith('.html')) { if (file.endsWith('.html')) {
let content = await fs.readFile(`packages/bruno-electron/web/${file}`, 'utf8'); let content = await fs.readFile(`packages/bruno-electron/web/${file}`, 'utf8');
content = content.replace(/\/_next\//g, '_next/'); content = content.replace(/\/static/g, './static');
await fs.writeFile(`packages/bruno-electron/web/${file}`, content); await fs.writeFile(`packages/bruno-electron/web/${file}`, content);
} }
} }