English
resolvePwaConfiguration
Function @unplugin-pwa/core/configts
resolvePwaConfiguration(pwaOptions: Partial<VitePWAOptions<UserStrategy, T>>, resolverOptions: ResolverOptions): Promise<ResolvedVitePWAOptions<ExtractStrategy<UserStrategy>, T>>Resolves the PWA configuration based on the provided options and resolver options.
This function will search for the PWA configuration file if the path option is not provided, and will merge the loaded configuration with the provided options.
When using inject-manifest, the resolverOptions.isWrongInjectManifest callback must resolve if the strategy is wrong, the implementation should be:
- if the service worker with
.tsor.mtsextension, then, it isbuild-swand notinject-manifeststrategy: must return true - if the service worker outside public dir, then, it is
build-swand notinject-manifeststrategy: must return true - otherwise must return false
Parameters
pwaOptions– The PWA options to resolve.resolverOptions– The resolver options containing environment information and callbacks.
Returns: The resolved PWA options.