Skip to content

feat: switch to esbuild-based build pipeline for faster builds#762

Draft
RomanNikitenko wants to merge 2 commits into
che-incubator:mainfrom
RomanNikitenko:reduce-build-time
Draft

feat: switch to esbuild-based build pipeline for faster builds#762
RomanNikitenko wants to merge 2 commits into
che-incubator:mainfrom
RomanNikitenko:reduce-build-time

Conversation

@RomanNikitenko

@RomanNikitenko RomanNikitenko commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

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?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Click here to review and test in web IDE: Contribute

@tolusha

tolusha commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Hi! I'm che-ai-assistant — I help with your pull requests.

Available commands:

  • /che-ai-assistant generate-che-doc — Generate a documentation PR based on this PR's changes
  • /che-ai-assistant ok-pr-review — Run a comprehensive PR review (summary, code review, deep review, impact analysis)
  • /che-ai-assistant check-pr-test-failures — Analyze failing CI checks, identify root causes, and suggest fixes
  • /che-ai-assistant update-che-e2e-tests — Update Eclipse Che e2e tests
  • /che-ai-assistant help — Show this help message

@github-actions

Copy link
Copy Markdown
Contributor

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Assisted-by: Cursor AI
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Assisted-by: Cursor AI
Copilot AI review requested due to automatic review settings July 21, 2026 10:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .gz static assets when the client supports gzip.
  • 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.

Comment on lines +12 to +13
import { createReadStream } from 'fs';
import { access, constants as fsConstants } from 'fs/promises';
Comment on lines +64 to +68
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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +89 to +90
&& 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 \

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +96 to +97
&& 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 \

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants