You are here

constant PWA_SW_ASSETS in Progressive Web App 7.2

4 uses of PWA_SW_ASSETS
pwa_admin_configuration_sw_patterns in ./pwa.admin.inc
pwa_update_7204 in ./pwa.install
Initialize the new variable for assets configuration.
_init_variables in ./pwa.install
_pwa_serviceworker_file in ./pwa.module
Take the serviceworker template file and replace all the variables needed.

File

./pwa.module, line 8

Code

define('PWA_SW_ASSETS', [
  'image' => [
    'strategy' => 'CacheFirst',
    'limitMaxSize' => TRUE,
    'maxSize' => 350,
    'external' => FALSE,
  ],
  'script' => [
    'strategy' => 'StaleWhileRevalidate',
    'limitMaxSize' => FALSE,
    'maxSize' => 500,
    'external' => TRUE,
  ],
  'style' => [
    'strategy' => 'StaleWhileRevalidate',
    'limitMaxSize' => FALSE,
    'maxSize' => 300,
    'external' => TRUE,
  ],
  'font' => [
    'strategy' => 'CacheFirst',
    'limitMaxSize' => FALSE,
    'maxSize' => 1000,
    'external' => TRUE,
  ],
]);