revert(electron): revert http protocl in electron (#8655)

fix AF-1583
This commit is contained in:
pengx17
2024-11-01 06:33:27 +00:00
parent 1973cea035
commit c915a3bcb5
6 changed files with 97 additions and 55 deletions

View File

@@ -71,9 +71,9 @@ if (!process.env.SKIP_WEB_BUILD) {
const fullpath = path.join(affineWebOutDir, file);
let content = await fs.readFile(fullpath, 'utf-8');
// replace # sourceMappingURL=76-6370cd185962bc89.js.map
// to # sourceMappingURL=/{dir}/76-6370cd185962bc89.js.map
// to # sourceMappingURL=assets://./{dir}/76-6370cd185962bc89.js.map
content = content.replace(/# sourceMappingURL=(.*)\.map/g, (_, p1) => {
return `# sourceMappingURL=assets:///${dir}/${p1}.map`;
return `# sourceMappingURL=assets://./${dir}/${p1}.map`;
});
try {
await fs.writeFile(fullpath, content);