Revert "debt - remove AMD support of VSCode for web" (#286421)

Revert "debt - remove AMD support of VSCode for web (#285230)"

This reverts commit 74c4ecddf7.
This commit is contained in:
Osvaldo Ortega
2026-01-07 11:30:20 -08:00
committed by GitHub
parent 8268e617ba
commit 84ce6e1a98
10 changed files with 354 additions and 173 deletions

View File

@@ -150,6 +150,15 @@ jobs:
node build/azure-pipelines/upload-cdn.ts
displayName: Upload to CDN
- script: |
set -e
AZURE_STORAGE_ACCOUNT="vscodeweb" \
AZURE_TENANT_ID="$(AZURE_TENANT_ID)" \
AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
AZURE_ID_TOKEN="$(AZURE_ID_TOKEN)" \
node build/azure-pipelines/upload-sourcemaps.ts out-vscode-web-min out-vscode-web-min/vs/workbench/workbench.web.main.js.map
displayName: Upload sourcemaps (Web Main)
- script: |
set -e
AZURE_STORAGE_ACCOUNT="vscodeweb" \
@@ -157,7 +166,7 @@ jobs:
AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
AZURE_ID_TOKEN="$(AZURE_ID_TOKEN)" \
node build/azure-pipelines/upload-sourcemaps.ts out-vscode-web-min out-vscode-web-min/vs/workbench/workbench.web.main.internal.js.map
displayName: Upload sourcemaps (Web)
displayName: Upload sourcemaps (Web Internal)
- script: |
set -e

View File

@@ -28,7 +28,7 @@ export const workbenchDesktop = [
createModuleDescription('vs/workbench/workbench.desktop.main')
];
export const workbenchWeb = createModuleDescription('vs/workbench/workbench.web.main.internal');
export const workbenchWeb = createModuleDescription('vs/workbench/workbench.web.main');
export const keyboardMaps = [
createModuleDescription('vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.linux'),

View File

@@ -19,6 +19,7 @@ import vfs from 'vinyl-fs';
import packageJson from '../package.json' with { type: 'json' };
import { compileBuildWithManglingTask } from './gulpfile.compile.ts';
import * as extensions from './lib/extensions.ts';
import VinylFile from 'vinyl';
import jsonEditor from 'gulp-json-editor';
import buildfile from './buildfile.ts';
@@ -81,6 +82,7 @@ const vscodeWebEntryPoints = [
buildfile.workerBackgroundTokenization,
buildfile.keyboardMaps,
buildfile.workbenchWeb,
buildfile.entrypoint('vs/workbench/workbench.web.main.internal') // TODO@esm remove line when we stop supporting web-amd-esm-bridge
].flat();
/**
@@ -141,8 +143,21 @@ function packageTask(sourceFolderName: string, destinationFolderName: string) {
const extensions = gulp.src('.build/web/extensions/**', { base: '.build/web', dot: true });
const sources = es.merge(src, extensions)
.pipe(filter(['**', '!**/*.{js,css}.map'], { dot: true }));
const loader = gulp.src('build/loader.min', { base: 'build', dot: true }).pipe(rename('out/vs/loader.js')); // TODO@esm remove line when we stop supporting web-amd-esm-bridge
const sources = es.merge(src, extensions, loader)
.pipe(filter(['**', '!**/*.{js,css}.map'], { dot: true }))
// TODO@esm remove me once we stop supporting our web-esm-bridge
.pipe(es.through(function (file) {
if (file.relative === 'out/vs/workbench/workbench.web.main.internal.css') {
this.emit('data', new VinylFile({
contents: file.contents,
path: file.path.replace('workbench.web.main.internal.css', 'workbench.web.main.css'),
base: file.base
}));
}
this.emit('data', file);
}));
const name = product.nameShort;
const packageJsonStream = gulp.src(['remote/web/package.json'], { base: 'remote/web' })

View File

@@ -152,7 +152,7 @@ function bundleESMTask(opts: IBundleESMTaskOpts): NodeJS.ReadWriteStream {
'.sh': 'file',
},
assetNames: 'media/[name]', // moves media assets into a sub-folder "media"
banner,
banner: entryPoint.name === 'vs/workbench/workbench.web.main' ? undefined : banner, // TODO@esm remove line when we stop supporting web-amd-esm-bridge
entryPoints: [
{
in: path.join(REPO_ROOT_PATH, opts.src, `${entryPoint.name}.js`),