-
Notifications
You must be signed in to change notification settings - Fork 37.9k
esbuild for transpile and bundle #294145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esbuild for transpile and bundle #294145
Conversation
- Include workbench-dev.html files for development mode (needed when VSCODE_DEV is set) - Add codicon.ttf font to resource patterns - Include test files and CSS in development builds (exclude only for production bundles) - Add comprehensive test fixture patterns for unit tests (json, txt, snap, tst, html, js, jxs, tsx, png, md, zip, pdf, qwoff, wuff, less, and extensionless executables) - Add excludeTests parameter to copyCssFiles and copyResources functions - Production bundles (--bundle) still exclude tests and dev files
- Introduced a new NLS plugin for esbuild to handle localization strings. - Implemented NLSCollector for managing localization entries across builds. - Added functionality to analyze TypeScript files for localize() and localize2() calls. - Created utility functions for parsing localization keys and values. - Enhanced the patching process for JavaScript files to replace localization calls with indices. - Refactored existing code to utilize the new analysis and transformation utilities.
…NLS and minification
…r, and server-web
…d date file in bundle process
…tories for backwards compatibility
…s and customizable output directory
…xtensions scanning
… quotes for NLS placeholders
…e patterns for desktop build
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new esbuild-based build pipeline (build/next) intended to speed up TypeScript transpilation and bundling, and wires it into existing gulp tasks and VS Code watch tasks.
Changes:
- Add new
build/nextesbuild orchestrator (transpile+bundle) and an esbuild-based NLS extraction/post-process plugin. - Update gulp build/CI tasks to use the new esbuild pipeline (and adjust NLS analysis implementation reuse).
- Split the default “VS Code - Build” watcher into separate “Core - Transpile” and “Core - Typecheck” tasks and add new npm scripts for the esbuild transpile watcher.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/base/browser/ui/codicons/codicon/codicon.css | Updates codicon font URL (removes cache-busting query string). |
| package.json | Adds npm scripts to run/daemonize the esbuild transpile watcher. |
| build/next/working.md | Adds working notes describing the new esbuild build system and validation steps. |
| build/next/nls-plugin.ts | Implements an esbuild plugin + post-processing to extract/replace NLS strings and write NLS metadata. |
| build/next/index.ts | Adds the esbuild-based transpile/bundle implementation, resource copying, placeholder injection, and watch mode. |
| build/lib/nls.ts | Refactors NLS patching to reuse shared analysis helpers. |
| build/lib/nls-analysis.ts | Extracts NLS/localize call analysis + text patching utilities into a shared module. |
| build/lib/compilation.ts | Adds noEmit support for gulp-tsb compilation/watch (typecheck-only mode). |
| build/gulpfile.vscode.web.ts | Switches vscode-web CI packaging to esbuild bundling and ensures codicons are copied. |
| build/gulpfile.vscode.ts | Adds esbuild-based core CI path and optionally routes packaging builds through esbuild. |
| build/gulpfile.ts | Changes watch-client behavior when esbuild transpile is enabled (typecheck-only via noEmit). |
| build/buildConfig.ts | Adds a flag to enable esbuild transpile mode (currently hard-coded on). |
| .vscode/tasks.json | Splits “Core - Build” into “Core - Transpile” + “Core - Typecheck”, adds kill task, and a new problem matcher. |
Comments suppressed due to low confidence (1)
build/gulpfile.vscode.ts:201
- Same issue as
runEsbuildTranspile:runEsbuildBundlespawns plainnodewith a.tsentrypoint (build/next/index.ts). Unless a TS loader is explicitly configured, this will crash with a syntax/unknown extension error. Please run the script viatsx(or an equivalent loader) in the spawned process.
const proc = cp.spawn(process.execPath, args, {
cwd: root,
stdio: 'inherit'
});
…messages.js generation
No description provided.