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.

Documentation changes for v5

See original GitHub issue

This is a master tracking issue for documentation changes we need to make along with releasing v5. We can update this issue as new breaking changes are introduced.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jeffposnickcommented, Jan 7, 2020

A couple of options:

  1. Use copy-webpack-plugin to ensure that your files on disk are part of the webpack asset pipeline, and then rely on the v5 plugin’s ability to precache those known assets. You can customize which webpack assets are cached via include/exclude instead of glob patterns.

  2. Use workbox-cli or workbox-build in a separate build step, run after the webpack compilation, with similar glob based options as before.

  3. Use manifestTransforms to make whatever changes you want to the manifest that the webpack plugin generates. This includes calling workbox-build’s getManifest() mode inside the manifestTransform to construct the manifest via the same options as was previously supported, i.e. glob patterns matching files on disk.

Option 1 is probably the most “webpack-y”, and I’d imagine most folks would go with something like that.

Option 2 is fairly easy to implement.

Option 3 is the most involved, but gives you the most control.

2reactions
jeffposnickcommented, Nov 1, 2019

@evdama, if you want a starting point, here’s a sample project that uses Svelte and Workbox v5, with Rollup bundling the service worker and then workbox-cli to inject the manifest: https://github.com/GoogleChrome/samples/tree/721722c6044d3e1388e2c317aa4d45a2141f9ca3/web-share

For folks who decide that they want to use v5 early, the main difference when switching from the CDN to consuming the bundles is that anything that used to look like

workbox.packageName.functionName(...);

now looks like

import {functionName} from 'workbox-packageName';

functionName(...);

(This existing guide covers some of that in more detail, but it will also need to be updated for v5.)

There are some renamings that happened between v4 and v5, specifically around the various Plugin classes, which all have their module name prefixed to the class name. So

new workbox.expiration.Plugin(...);

has a v5 equivalent of

import {ExpirationPlugin} from 'workbox-expiration';

new ExpirationPlugin(...);

And there a number of more involved changes to the build tools, especially the webpack plugin.

v5 is currently feature complete, and we’ve ironed out a couple of bugs since entering the release candidate phase. The last remaining task before making v5 final is doing the documentation overhaul, and as per your question, it’s going to be something much closer to 1 month than 6 months for that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update documentation for v5 changes · Issue #868 - GitHub
With the changes happening in v5; we should thoroughly review the documentation provided to ensure all references are brought up to date for ......
Read more >
(GEN-22-06) Changes to 2022-2023 Verification Requirements
Please note that Verification Tracking group V5 includes a combination of the verification of income/tax information (which is waived under this ...
Read more >
Migrating to v5 - Bootstrap
Documentation changes. Redesigned homepage, docs layout, and footer. Added new Parcel guide. Added new Customize section, replacing v4's Theming page, with ...
Read more >
Changes to the vehicle registration certificate (V5C)
Changes to the vehicle registration certificate (V5C) · The document reference number has moved to the top and the words 'Don't share, keep...
Read more >
Change your address on your vehicle log book (V5C) - GOV.UK
Change your address ... You must update your vehicle log book (V5C) if you change your address. It's usually free to update it....
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