mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
build(electron): use live origin http protocol instead of file:// (#8464)
fix AF-1428
This commit is contained in:
@@ -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=assets://./{dir}/76-6370cd185962bc89.js.map
|
||||
// to # sourceMappingURL=/{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);
|
||||
|
||||
Reference in New Issue
Block a user