Socket
Socket
Sign inDemoInstall

@aaroon/workbox-rspack-plugin

Package Overview
Dependencies
4
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aaroon/workbox-rspack-plugin


Version published
Maintainers
1
Created

Changelog

Source

0.3.1 (2024-04-07)

Bug Fixes

  • should use dynamic import for pure esm packages, close #4 (1c325b74)

Readme

Source

workbox-rspack-plugin

NPM version NPM Downloads License Minified Size Build Status

An rspack plugin to use workbox in rspack. Both GenerateSW and InjectManifest are supported. And all the options are the same as the official workbox-webpack-plugin. Currently, it passes all the tests from the official workbox-webpack-plugin, and should be stable for general uses. If you find anything wrong, feel free to open an issue.

Requirement

@rspack/core@^0.5.6

Or

@rsbuild/core@^0.4.11

Install

npm i -D @aaroon/workbox-rspack-plugin

Or

pnpm i -D @aaroon/workbox-rspack-plugin
yarn add -D @aaroon/workbox-rspack-plugin

Usage

import { GenerateSW, InjectManifest } from '@aaroon/workbox-rspack-plugin'
/**
 * @type import('@rspack/cli').Configuration}
 */
export default {
    plugins: [
        new GenerateSW({
            // options
        }),
        // or
        new InjectManifest({
            // options
        })
    ]
}

If you're using Rsbuild, use it in tools.rspack.plugins:

import { defineConfig } from '@rsbuild/core'
import { GenerateSW, InjectManifest } from '@aaroon/workbox-rspack-plugin'

export default defineConfig({
    tools: {
        rspack: {
            plugins: [
                new GenerateSW({
                    // options
                }),
                // or
                new InjectManifest({
                    // options
                })
            ]
        }
    }
})

Options

Same as workbox-webpack-plugin.

Changelog

Changelog can be found here.

Credits

Most of the code comes from Google's workbox repo, I just make it compatible with Rspack.

Acknowledgment

If you found it useful somehow, I would be grateful if you could leave a star in the project's GitHub repository.

Thank you.

Keywords

FAQs

Last updated on 07 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc