| 134 | type: (_, all) => all.features.includes('service-worker') && 'select', |
| 135 | choices: toChoices(['None', 'Offline Plugin', 'SW Precache', 'SW Workbox']), |
| 136 | format(val) { |
| 137 | if (val === 'none') return false; |
| 138 | // if (val === 'custom') return (all.swCustom=true,false); TODO |
| 139 | if (val === 'offline-plugin') return '@pwa/plugin-offline'; |
| 140 | if (val === 'sw-precache') return '@pwa/plugin-sw-precache'; |
| 141 | if (val === 'sw-workbox') return '@pwa/plugin-sw-workbox'; |
| 142 | } |
| 143 | }, |
| 144 | // TODO: Testing options |
| 145 | { |