Skip to content
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

Use esbuild with webpack #1761

Merged
merged 2 commits into from
May 24, 2024
Merged

Use esbuild with webpack #1761

merged 2 commits into from
May 24, 2024

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented May 23, 2024

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.

@jpogran jpogran self-assigned this May 23, 2024
@jpogran jpogran marked this pull request as ready for review May 23, 2024 18:14
@jpogran jpogran requested a review from a team as a code owner May 23, 2024 18:14
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.
@jpogran jpogran merged commit 6477a53 into main May 24, 2024
12 checks passed
@jpogran jpogran deleted the esbuild-loader branch May 24, 2024 14:33
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants