2022-03-30 10:35:22 -05:00
|
|
|
Make sourcemaps self-hosted
|
|
|
|
|
|
|
|
|
|
Normally source maps get removed as part of the build process so prevent that
|
|
|
|
|
from happening. Also avoid using the windows.net host since obviously we can
|
|
|
|
|
not host our source maps there and want them to be self-hosted even if we could.
|
|
|
|
|
|
|
|
|
|
To test try debugging/browsing the source of a build in a browser.
|
|
|
|
|
|
2025-12-12 02:02:11 +01:00
|
|
|
Index: code-server/lib/vscode/build/gulpfile.reh.ts
|
2022-03-30 10:35:22 -05:00
|
|
|
===================================================================
|
2025-12-12 02:02:11 +01:00
|
|
|
--- code-server.orig/lib/vscode/build/gulpfile.reh.ts
|
|
|
|
|
+++ code-server/lib/vscode/build/gulpfile.reh.ts
|
2026-03-06 09:54:52 +01:00
|
|
|
@@ -261,8 +261,7 @@ function packageTask(type: string, platf
|
2025-12-12 02:02:11 +01:00
|
|
|
return () => {
|
2022-03-30 10:35:22 -05:00
|
|
|
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
|
2025-12-12 02:02:11 +01:00
|
|
|
.pipe(rename(function (path) { path.dirname = path.dirname!.replace(new RegExp('^' + sourceFolderName), 'out'); }))
|
2022-03-30 10:35:22 -05:00
|
|
|
- .pipe(util.setExecutableBit(['**/*.sh']))
|
2025-07-15 22:04:46 +02:00
|
|
|
- .pipe(filter(['**', '!**/*.{js,css}.map']));
|
2022-03-30 10:35:22 -05:00
|
|
|
+ .pipe(util.setExecutableBit(['**/*.sh']));
|
|
|
|
|
|
|
|
|
|
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
|
2025-12-12 02:02:11 +01:00
|
|
|
const isUIExtension = (manifest: { extensionKind?: string; main?: string; contributes?: Record<string, unknown> }) => {
|
2026-03-06 09:54:52 +01:00
|
|
|
@@ -302,9 +301,9 @@ function packageTask(type: string, platf
|
2022-03-30 10:35:22 -05:00
|
|
|
.map(name => `.build/extensions/${name}/**`);
|
|
|
|
|
|
|
|
|
|
const extensions = gulp.src(extensionPaths, { base: '.build', dot: true });
|
|
|
|
|
- const extensionsCommonDependencies = gulp.src('.build/extensions/node_modules/**', { base: '.build', dot: true });
|
|
|
|
|
- const sources = es.merge(src, extensions, extensionsCommonDependencies)
|
|
|
|
|
+ const extensionsCommonDependencies = gulp.src('.build/extensions/node_modules/**', { base: '.build', dot: true })
|
2025-07-15 22:04:46 +02:00
|
|
|
.pipe(filter(['**', '!**/*.{js,css}.map'], { dot: true }));
|
2022-03-30 10:35:22 -05:00
|
|
|
+ const sources = es.merge(src, extensions, extensionsCommonDependencies);
|
|
|
|
|
|
|
|
|
|
let version = packageJson.version;
|
2025-12-12 02:02:11 +01:00
|
|
|
const quality = (product as typeof product & { quality?: string }).quality;
|
2026-03-06 09:54:52 +01:00
|
|
|
@@ -491,7 +490,7 @@ function tweakProductForServerWeb(produc
|
2022-03-30 10:35:22 -05:00
|
|
|
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
|
2024-11-01 20:32:25 +00:00
|
|
|
bundleTask,
|
2022-03-30 10:35:22 -05:00
|
|
|
util.rimraf(`out-vscode-${type}-min`),
|
2024-07-08 22:10:34 +00:00
|
|
|
- optimize.minifyTask(`out-vscode-${type}`, `https://main.vscode-cdn.net/sourcemaps/${commit}/core`)
|
2022-10-17 16:30:39 -07:00
|
|
|
+ optimize.minifyTask(`out-vscode-${type}`, ``)
|
2022-03-30 10:35:22 -05:00
|
|
|
));
|
|
|
|
|
gulp.task(minifyTask);
|
|
|
|
|
|