clearuf.blogg.se

Webpack documentation
Webpack documentation






Java is a registered trademark of Oracle and/or its affiliates. For details, see the Google Developers Site Policies. Guidance on using the plugins within the context of a larger webpack build can be found in theĮxcept as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. You can add the GenerateSW plugin to your webpack config like so: // Inside of :Ĭonst = require('workbox-webpack-plugin') Ī full set of configuration options can be found on You want the easiest path to adding a service worker to your site.You would like to use your service worker with other API's (e.g.You have more complex needs in terms of routing.

webpack documentation

  • You want more control over your service worker.
  • The InjectManifest plugin will generate a list of URLs to precache andĪdd that precache manifest to an existing service workerįile.
  • You want to import additional scripts or add additional logic.
  • You want to use other Service Worker features (i.e.
  • You have simple runtime configuration needs (e.g.
  • The GenerateSW plugin will create a service worker file for you and The answers to the following questions can help you choose the The plugins are implemented as two classes in the workbox-webpack-plugin module, named

    webpack documentation

    Of assets to precache that is injected into a service worker file. Generates a complete service worker for you and one that generates a list

    webpack documentation

    Workbox provides two webpack plugins: one that Installing Webpack Configuring Webpack Running Webpack Using the Webpack Bundle Importing Individual Services Bundling for Node.js The AWS SDK for JavaScript version 3 (v3) is a rewrite of v2 with some great new features, including modular architecture.








    Webpack documentation