• English
  • Plugin setup

    In order to use virtual modules registerSw type in the plugin config needs to be changed to virtual-module.

    // rsbuild.config.ts
    import { defineConfig } from "@rsbuild/core";
    import { pluginPWA } from "rsbuild-plugin-pwa";
    
    export default defineConfig({
      plugins: [
        pluginPWA({
          registerSw: {
            type: "virtual-module",
          },
        }),
      ],
    });