npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

serviceworker-webpack-plugin-martiuh

v0.3.1

Published

It's a copy of oliviertassinari/serviceworker-webpack-plugin

Downloads

15

Readme

serviceworker-webpack-plugin

Simplifies creation of a service worker to serve your webpack bundles.

Installation

npm i serviceworker-webpack-plugin-martiuh

It's only compatible with webpack 1, 2, and 3

The simple truth

First of all, this a simple fork, it only adds a feature necessary for a project I'm doing, which is scriptURL it can now be set manually and the service worker will try to be installed from that specific directory. All the work is to oliviertassinari and the amazing serviceworker-webpack-plugin

API

ServiceWorkerWebpackPlugin(options)

  • options
  • entry, required, string: Path to the actual service worker implementation.
  • filename, string, default 'sw.js': Relative (from the webpack's config output.path) output path for emitted script.
  • excludes, array, default ['**/.*', '**/*.map']: Exclude matched assets from being added to the serviceWorkerOption.assets variable. (Blacklist)
  • includes, array, default ['**/*']: Include matched assets added to the serviceWorkerOption.assets variable. (Whitelist)
  • publicPath, string, default '/': Specifies the public URL address of the output files when referenced in a browser.
  • outputDir: If you want your serviceWorker file to be stored in a aditional folder inside webpack's output path.
  • template, function, default noop: This callback function can be used to inject statically generated service worker. It's taking a serviceWorkerOption argument and must return a promise.
  • transformOptions, function: The jsonStats key contains all the webpack build information.

runtime(options)

Credit

The specs

License

MIT