question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move off of rollup and on to esbuild/swc/??? for generateSW

See original GitHub issue

We currently use Rollup in our build tools’ “generate” modes to take a templated service worker source file + config, and produce either a single output service worker (if inlineWorkbox is true) or a service worker + custom Workbox runtime bundle (if inlineWorkbox is false; this mode uses rollup-plugin-off-main-thread.

Rollup is a fantastic tool and we’ll likely continue to use it to generate, e.g., our pre-bundled libraries that are released on the CDN. For the more basic use case within the “generate” modes, it can be overkill, and its runtime performance is generally slower than Rust- or Go-based bundlers.

We should reevaluate our options for Workbox v7.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yckbilly1929commented, Oct 31, 2022

No problem. New screenshots below.

Rollup: generate-sw-by-rollup

Esbuild: generate-sw-by-esbuild

0reactions
yckbilly1929commented, Nov 2, 2022

Another candidate for speedups https://vercel.com/blog/turbopack

Yes. In fact I was also trying to bundle with swc, but stuck on inline import.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Design system fresh bundling - Medium
We mapped the most common (efficient?) options with our needs. Almost all of the options use Rollup + esbuild/swc to parse the code....
Read more >
Issues · GoogleChrome/workbox · GitHub
Move off of rollup and on to esbuild/swc/??? for generateSW Breaking Change Denotes a "major" semver change. Developer Experience Related to ease of...
Read more >
Evan You on Twitter: "Other compilers compared include swc ...
esbuild is written with go and distributed as native go binary ... using esbuild instead of vanilla tsc in webpack loaders or rollup...
Read more >
Why we switched from Webpack to Vite - Hacker News
We still have plugins/starter templates for Webpack and Rollup, ... Check out https://github.com/sodatea/vite-test-example for an example ...
Read more >
UI Therapy | UI Design and Development Podcast Jake Hopking
I will seek out industry professionals and experts who are striving to make ... the industry via ActionScript, then moved over JS when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found