Skip to content

createCustomVitePWAContext ​

Function @unplugin-pwa/vite/vite-context
ts
createCustomVitePWAContext(bundler: B, envApi: boolean, userOptions: Partial<VitePWAOptions<UserStrategy, T>>): VitePWAPluginContext<B, UserStrategy, T>

Helper to create a Vite PWA context for modern versions (Vite >= 6).

Parameters ​

  • bundler – Type of bundler to use.

  • envApi – Should Vite Environment Api be enabled?.

  • userOptions – The PWA options.

Released under the MIT License.