forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
939 stars 397 forks source link

feat: opt in bundling @salesforce/core #5656

Closed mingxuanzhangsfdx closed 1 week ago

mingxuanzhangsfdx commented 1 week ago

What does this PR do?

This PR replaces @salesforce/core, @salesforce/source-deploy-retrieve, @salesforce/source-tracking and @salesforce/apex-node with the bundle-able modules in all extensions and bundles the dependency @salesforce/core-bundle, @salesforce/source-deploy-retrieve-bundle, @salesforce/source-tracking-bundle that were previously externalized in the extensions.

What issues does this PR fix or reference?

@W-15635320@

Functionality Before

core, sdr, source-tracking are externalized during the esbuild bundle. The size of the extension pack is up to 100MB now.

Functionality After

After opting in the dependencies with bundle-able versions and bundle the dependencies, the size of the extension pack is reduced to 61.7MB and a significant improvement in extension startup performance is expected.