UNPKG

598 BJavaScriptView Raw
1/*
2 Copyright 2019 Google LLC
3
4 Use of this source code is governed by an MIT-style
5 license that can be found in the LICENSE file or at
6 https://opensource.org/licenses/MIT.
7*/
8import { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';
9import './_version.js';
10/**
11 * Adds plugins to the precaching strategy.
12 *
13 * @param {Array<Object>} plugins
14 *
15 * @memberof workbox-precaching
16 */
17function addPlugins(plugins) {
18 const precacheController = getOrCreatePrecacheController();
19 precacheController.strategy.plugins.push(...plugins);
20}
21export { addPlugins };