source: frontend/node_modules/workbox-precaching/src/addPlugins.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 669 bytes
RevLine 
[9af201e]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*/
8
9import {WorkboxPlugin} from 'workbox-core/types.js';
10import {getOrCreatePrecacheController} from './utils/getOrCreatePrecacheController.js';
11import './_version.js';
12
13/**
14 * Adds plugins to the precaching strategy.
15 *
16 * @param {Array<Object>} plugins
17 *
18 * @memberof workbox-precaching
19 */
20function addPlugins(plugins: WorkboxPlugin[]): void {
21 const precacheController = getOrCreatePrecacheController();
22 precacheController.strategy.plugins.push(...plugins);
23}
24
25export {addPlugins};
Note: See TracBrowser for help on using the repository browser.