Workbox v4.0.0-rc.1
Pre-release
Pre-release
The latest RC release of Workbox v4 includes the following developer-visible changes, in addition to all the changes from the previous pre-releases.
🎉 What's New?
workbox-window
- The
workbox-window
package now ships with a few different build options, to help make it as easy as possible for people to include it in to their existing tool chain [#1895, #1899]. Here's what's currently supported:
- Requiring
workbox-window
in node (or any or environment that doesn't support native modules):
// Imports a UMD version with ES5 syntax
const {Workbox} = require('workbox-window');
- Importing
workbox-window
via webpack or Rollup in a context where your build does not automatically transpile anything innode_modules
:
// Imports the module version with ES5 syntax
import {Workbox} from 'workbox-window';
- Importing
workbox-window
via webpack or Rollup in a context where you can handle transpiling yourself (or you don't need to transpile to ES5):
// Imports the module version with ES2015+ syntax
import {Workbox} from 'workbox-window/Workbox.mjs';
Note: option 3 above will usually result in the smallest file size, so it's recommend to do that if your build supports it.