|
| 1 | +Make sourcemaps self-hosted |
| 2 | + |
| 3 | +Normally source maps get removed as part of the build process so prevent that |
| 4 | +from happening. Also avoid using the windows.net host since obviously we can |
| 5 | +not host our source maps there and want them to be self-hosted even if we could. |
| 6 | + |
| 7 | +To test try debugging/browsing the source of a build in a browser. |
| 8 | + |
| 9 | +Index: code-server/lib/vscode/build/gulpfile.reh.js |
| 10 | +=================================================================== |
| 11 | +--- code-server.orig/lib/vscode/build/gulpfile.reh.js |
| 12 | ++++ code-server/lib/vscode/build/gulpfile.reh.js |
| 13 | +@@ -195,8 +195,7 @@ function packageTask(type, platform, arc |
| 14 | + |
| 15 | + const src = gulp.src(sourceFolderName + '/**', { base: '.' }) |
| 16 | + .pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); })) |
| 17 | +- .pipe(util.setExecutableBit(['**/*.sh'])) |
| 18 | +- .pipe(filter(['**', '!**/*.js.map'])); |
| 19 | ++ .pipe(util.setExecutableBit(['**/*.sh'])); |
| 20 | + |
| 21 | + const workspaceExtensionPoints = ['debuggers', 'jsonValidation']; |
| 22 | + const isUIExtension = (manifest) => { |
| 23 | +@@ -235,9 +234,9 @@ function packageTask(type, platform, arc |
| 24 | + .map(name => `.build/extensions/${name}/**`); |
| 25 | + |
| 26 | + const extensions = gulp.src(extensionPaths, { base: '.build', dot: true }); |
| 27 | +- const extensionsCommonDependencies = gulp.src('.build/extensions/node_modules/**', { base: '.build', dot: true }); |
| 28 | +- const sources = es.merge(src, extensions, extensionsCommonDependencies) |
| 29 | ++ const extensionsCommonDependencies = gulp.src('.build/extensions/node_modules/**', { base: '.build', dot: true }) |
| 30 | + .pipe(filter(['**', '!**/*.js.map'], { dot: true })); |
| 31 | ++ const sources = es.merge(src, extensions, extensionsCommonDependencies); |
| 32 | + |
| 33 | + let version = packageJson.version; |
| 34 | + const quality = product.quality; |
| 35 | +@@ -363,7 +362,7 @@ function packageTask(type, platform, arc |
| 36 | + const minifyTask = task.define(`minify-vscode-${type}`, task.series( |
| 37 | + optimizeTask, |
| 38 | + util.rimraf(`out-vscode-${type}-min`), |
| 39 | +- common.minifyTask(`out-vscode-${type}`, `https://ticino.blob.core.windows.net/sourcemaps/${commit}/core`) |
| 40 | ++ common.minifyTask(`out-vscode-${type}`, '') |
| 41 | + )); |
| 42 | + gulp.task(minifyTask); |
| 43 | + |
0 commit comments