mirror of
https://github.com/usebruno/bruno.git
synced 2025-08-15 15:32:41 +02:00
fix windows build (#4043)
This commit is contained in:
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user