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

Switch to esbuild for building the library #116

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Switch to esbuild for building the library #116

wants to merge 6 commits into from

Conversation

oleiade
Copy link
Member

@oleiade oleiade commented Sep 6, 2024

This PR drops webpack and switches to esbuild to build and bundle the library.

Here are a couple of reasons for that:

  • esbuild is much, much faster than webpack.
  • esbuild feels simpler to configure (at least to me), and allows for a cleaner, more maintainable configuration. It took me a day to configure webpack+babel, and I was not certain I understood what was happening. Esbuild took me 30 minutes, and I do understand what's going on.
  • we already rely on esbuild to support typescript in k6, and aligning things to gain experience and confidence around it made sense.

Apart from switching to build, the most notable change in this PR is that we configured it to use the ES modules format instead of CommonJS. The recent introduction of native ES Modules support in Sobek shouldn't pose any problem, but you never know.

@oleiade oleiade added the enhancement New feature or request label Sep 6, 2024
@oleiade oleiade self-assigned this Sep 6, 2024
@oleiade oleiade requested a review from a team as a code owner September 6, 2024 14:46
@oleiade oleiade requested review from mstoykov and joanlopez and removed request for a team September 6, 2024 14:46
@oleiade oleiade marked this pull request as draft September 6, 2024 14:50
@oleiade
Copy link
Member Author

oleiade commented Sep 6, 2024

Apologies for the noise, switching to draft as I caught issues in CI after the fact 👍🏻

@oleiade oleiade marked this pull request as ready for review September 6, 2024 15:21
build.mjs Outdated Show resolved Hide resolved
@oleiade oleiade closed this Sep 24, 2024
@oleiade oleiade deleted the esbuild branch September 24, 2024 08:08
@oleiade oleiade restored the esbuild branch September 24, 2024 08:09
@oleiade oleiade reopened this Oct 8, 2024
@oleiade
Copy link
Member Author

oleiade commented Oct 8, 2024

I'm so confused, but TIL that if you delete a branch, even mistakenly, it automatically deletes the PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants