Skip to content

buildPwaAsset ​

Function @unplugin-pwa/core/build-pwa-asset
ts
buildPwaAsset(code: string, ctx: PWAPluginContext<B, UserStrategy, T>, resolver?: Pick<Plugin<any>, "resolveId" | "load">): Promise<string>

This module will build registerSW or any virtual module.

Parameters ​

  • code – The code to build.

  • ctx – The context of the PWA bundler.

  • resolver – Rolldown hooks to resolve dependencies.

Released under the MIT License.