Files
code-server/patches/sourcemaps.diff
Asher cc8f0b7348 Strip sourcemaps (#7756)
This will significantly reduce the size, and for errors we should be
able to map them as necessary.
2026-04-15 22:56:00 -08:00

26 lines
1.1 KiB
Diff

Remove sourcemaps URL
These will not work since we patch VS Code.
Index: code-server/lib/vscode/build/gulpfile.reh.ts
===================================================================
--- code-server.orig/lib/vscode/build/gulpfile.reh.ts
+++ code-server/lib/vscode/build/gulpfile.reh.ts
@@ -261,10 +261,15 @@ function packageTask(type: string, platf
const destination = path.join(BUILD_ROOT, destinationFolderName);
return () => {
+ const jsFilterMain = util.filter(data => !data.isDirectory() && /\.js$/.test(data.path));
+
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
.pipe(rename(function (path) { path.dirname = path.dirname!.replace(new RegExp('^' + sourceFolderName), 'out'); }))
.pipe(util.setExecutableBit(['**/*.sh']))
- .pipe(filter(['**', '!**/*.{js,css}.map']));
+ .pipe(filter(['**', '!**/*.{js,css}.map']))
+ .pipe(jsFilterMain)
+ .pipe(util.stripSourceMappingURL())
+ .pipe(jsFilterMain.restore);
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
const isUIExtension = (manifest: { extensionKind?: string; main?: string; contributes?: Record<string, unknown> }) => {