workbox icon indicating copy to clipboard operation
workbox copied to clipboard

feat(build): support esbuild bundling

Open yckbilly1929 opened this issue 3 years ago • 1 comments

Fixes https://github.com/GoogleChrome/workbox/issues/3002 (Support using esbuild as bundling when generateSW)

This PR adds support for using esbuild as bundler by adding esbuild and @esbuild-plugins/node-resolve to workbox-build. Feature is enabled only when esbuildOptions is passed as true or esbuild.BuildOptions to generateSW().

Differences:

  • only supports inline runtime, as there is no native support to output as amd format (but magic solution exists though)
  • default browser target changed from >= chrome56 to [chrome60, safari11, edge18]
  • service-worker.js output size increases (from 21 kb to 23 kb in my case)

yckbilly1929 avatar Oct 31 '22 03:10 yckbilly1929

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Oct 31 '22 03:10 google-cla[bot]

Hi there,

Workbox is moving to a new engineering team within Google. As part of this move, we're declaring a partial bug bankruptcy to allow the new team to start fresh. We realize this isn't optimal, but realistically, this is the only way we see it working. For transparency, here're the criteria we applied:

Thanks, and we hope for your understanding! The Workbox team

tomayac avatar Apr 25 '24 08:04 tomayac