esm - introduce VSCODE_BUILD_ESM variable (#225586)

This commit is contained in:
Benjamin Pasero
2024-08-14 14:49:26 +02:00
committed by GitHub
parent 7f4969a41e
commit 0dea4804f4
22 changed files with 960 additions and 57 deletions

View File

@@ -8,6 +8,7 @@ import * as fs from 'fs';
import * as minimatch from 'minimatch';
import { makeUniversalApp } from 'vscode-universal-bundler';
import { spawn } from '@malept/cross-spawn-promise';
import { isESM } from '../lib/esm';
const root = path.dirname(path.dirname(__dirname));
@@ -31,13 +32,15 @@ async function main(buildDir?: string) {
'**/Credits.rtf',
];
const canAsar = !isESM('ASAR disabled in universal build'); // TODO@esm ASAR disabled in ESM
await makeUniversalApp({
x64AppPath,
arm64AppPath,
asarPath: asarRelativePath,
asarPath: canAsar ? asarRelativePath : undefined,
outAppPath,
force: true,
mergeASARs: true,
mergeASARs: canAsar,
x64ArchFiles: '*/kerberos.node',
filesToSkipComparison: (file: string) => {
for (const expected of filesToSkip) {