Skip to content

preparePWAContextDefaults ​

Function @unplugin-pwa/vite/helpers
ts
preparePWAContextDefaults(forClient: boolean, config: ResolvedConfig, ctx: VitePWAPluginContext<ViteBundler, UserStrategy, T>): Promise<void>

Prepares the PWA defaults from main plugin.

NOTE: if the PWA plugin context has pwaConfigurationLoaded set to true, this function will return immediately.

Parameters ​

  • forClient – The Vite resolved configuration is for client?.

  • config – The Vite resolved configuration.

  • ctx – The PWA Vite plugin context.

Released under the MIT License.