hashicorp / vscode-terraform

HashiCorp Terraform VSCode extension
https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform
Mozilla Public License 2.0
911 stars 180 forks source link

Use esbuild with webpack #1761

Closed jpogran closed 1 month ago

jpogran commented 1 month ago

This commit uses esbuild-loader instead of ts-loader.

As part of our move to supporting web extensions, we moved from a pure esbuild configuration to a webpack based one. However the default TypeScript webpack bundler is slow compared to esbuild. We knew this when moving, but delayed figuring out how to use esbuild at a later date.

This commit uses esbuild-loader instead of ts-loader, which reduces build times from ~8-10 seconds to ~2-3 seconds. This benefits local development time as well as in CI. In CI we package 9 platforms, each taking over a minute to package. This now takes a few seconds for each platform.

This is a short term fix, as we plan to move to a pure esbuild configuration in the future.

github-actions[bot] commented 2 weeks ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.