feat: switch to esbuild-based build pipeline for faster builds#762
feat: switch to esbuild-based build pipeline for faster builds#762RomanNikitenko wants to merge 2 commits into
Conversation
|
Hi! I'm che-ai-assistant — I help with your pull requests. Available commands:
|
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-762-amd64 |
1 similar comment
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-762-amd64 |
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Assisted-by: Cursor AI
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Assisted-by: Cursor AI
4202161 to
6e2b121
Compare
There was a problem hiding this comment.
Pull request overview
Updates Che-Code’s build and static-asset delivery pipeline by integrating the new esbuild-based bundling flow into container builds and adding Che-specific support for serving pre-compressed static assets.
Changes:
- Adds Che-specific support to serve pre-compressed
.gzstatic assets when the client supportsgzip. - Updates container build Dockerfiles to run the new esbuild-based bundling pipeline and pre-compress static assets during image build.
- Refreshes Che server helper code/header to support the new static serving behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
code/src/vs/server/node/webClientServer.ts |
Attempts to serve pre-compressed assets before falling back to the regular static file path. |
code/src/vs/server/node/che/webClientServer.ts |
Introduces tryServeCompressedFile helper and updates Che copyright header. |
build/dockerfiles/linux-musl.Dockerfile |
Switches Alpine build to the new esbuild-based bundling steps and adds gzip pre-compression of assets. |
build/dockerfiles/linux-libc-ubi9.Dockerfile |
Switches UBI9 build to the new esbuild-based bundling steps and adds gzip pre-compression of assets. |
build/dockerfiles/linux-libc-ubi8.Dockerfile |
Switches UBI8 build to the new esbuild-based bundling steps and adds gzip pre-compression of assets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { createReadStream } from 'fs'; | ||
| import { access, constants as fsConstants } from 'fs/promises'; |
| res.once('close', () => gzStream.destroy()); | ||
| gzStream.on('end', resolve); | ||
| gzStream.removeAllListeners('error'); | ||
| gzStream.on('error', () => res.destroy()); | ||
| }); |
| RUN VSCODE_MANGLE_WORKERS=2 NODE_OPTIONS="--max-old-space-size=8192" ./node_modules/.bin/gulp vscode-reh-web-linux-alpine-min | ||
| RUN NODE_OPTIONS="--max-old-space-size=8192" ./node_modules/.bin/gulp copy-codicons compile-non-native-extensions-build compile-copilot-extension-build compile-extension-media-build | ||
| RUN npx tsgo --project src/tsconfig.json --noEmit --skipLibCheck | ||
| RUN NODE_OPTIONS="--max-old-space-size=8192" node build/next/index.ts bundle --minify --nls --mangle-privates --target server-web --out out-vscode-reh-web-min |
There was a problem hiding this comment.
This comment is incorrect. Node.js 22+ (we use 22.22.1) has built-in TypeScript support via --experimental-strip-types, which is enabled by default for .ts files in recent versions. The node build/next/index.ts invocation works without tsx or any additional loader.
| && NODE_OPTIONS="--max-old-space-size=8192" node build/next/index.ts bundle --minify --nls --mangle-privates --target server-web --out out-vscode-reh-web-min \ | ||
| && NODE_OPTIONS="--max-old-space-size=8192" ./node_modules/.bin/gulp vscode-reh-web-linux-${NODE_ARCH}-min-ci \ |
There was a problem hiding this comment.
Node.js 22+ (we use 22.22.1) has built-in TypeScript support via --experimental-strip-types, which is enabled by default for .ts files in recent versions. The node build/next/index.ts invocation works without tsx or any additional loader.
| && NODE_OPTIONS="--max-old-space-size=8192" node build/next/index.ts bundle --minify --nls --mangle-privates --target server-web --out out-vscode-reh-web-min \ | ||
| && NODE_OPTIONS="--max-old-space-size=8192" ./node_modules/.bin/gulp vscode-reh-web-linux-${NODE_ARCH}-min-ci \ |
There was a problem hiding this comment.
Node.js 22+ (we use 22.22.1) has built-in TypeScript support via --experimental-strip-types, which is enabled by default for .ts files in recent versions. The node build/next/index.ts invocation works without tsx or any additional loader.
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-762-amd64 |
What does this PR do?
What issues does this PR fix?
How to test this PR?
Does this PR contain changes that override default upstream Code-OSS behavior?
git rebasewere added to the .rebase folder