fix: 构建后编辑器打不开

This commit is contained in:
AncTe committed 2025-09-02 14:41:24 +08:00
1 parent 0b611c897a
commit 0d98a6ce57
9 files changed
+190 -72

No files matched your search

+7 -2
View File
@@ -435,9 +435,13 @@ async function buildGame() {
);
}
const code = transformed.code;
const modifiedHead = head.replace(
'this.scriptCompress = false;',
'this.scriptCompress = true;'
);
await writeFile(
resolve(tempDir, 'common/main.js'),
head + '\n// >>>> body end\n' + code,
modifiedHead + '\n// >>>> body end\n' + code,
'utf-8'
);
} catch (e) {
@@ -523,7 +527,8 @@ async function buildGame() {
'project/icons.js',
'project/items.js',
'project/maps.js',
'project/plugins.js'
'project/plugins.js',
'project/materials/airwall.png'
];
clientPackArr.forEach(v => {