Repository navigation
Bundle extension as ESM to benefit from code splitting - #373
Merged
Merged
Conversation
Brandon Waterloo (bwateratmsft)
requested a review
from a team
as a code owner
February 2, 2026 16:49
Brandon Waterloo (bwateratmsft)
marked this pull request as draft
February 2, 2026 21:47
Collaborator
Author
|
Switching to draft...something is breaking loading |
Patrick Verbrugge (patverb)
previously approved these changes
Feb 2, 2026
Collaborator
Author
|
Currently blocked by: |
Brandon Waterloo (bwateratmsft)
force-pushed
the
bmw/esmExtension
branch
from
February 5, 2026 17:02
e8f22e7 to
093fd88
Compare
Brandon Waterloo (bwateratmsft)
marked this pull request as ready for review
February 5, 2026 17:03
Contributor
There was a problem hiding this comment.
Pull request overview
This PR converts the extension from CommonJS to ESM (ECMAScript Modules) format to enable code splitting and improve extension loading performance, addressing issue #366 where code loading time increased in version 2.4.0.
Changes:
- Converted main.mjs from CommonJS to ESM syntax with dynamic imports
- Updated package.json to reference main.mjs and added module field
- Enabled ESM bundling in esbuild configuration
- Updated language server references to use .mjs extension
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| main.mjs | Converted from CommonJS exports to ESM exports with dynamic import of extension bundle |
| package.json | Updated main entry point to main.mjs, added module field, and upgraded vscode-azext-eng to enable ESM bundling |
| package-lock.json | Updated lockfile to reflect vscode-azext-eng version bump to 1.0.0-alpha.12 |
| esbuild.mjs | Enabled ESM mode by passing true parameter to autoSelectEsbuildConfig |
| src/extension.ts | Updated language server file references from server.js to server.mjs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Brandon Waterloo (bwateratmsft)
enabled auto-merge (squash)
February 5, 2026 17:09
Patrick Verbrugge (patverb)
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #366