All Projects → prateekbh → preact-cli-sw-precache

prateekbh / preact-cli-sw-precache

Licence: MIT license
Preact cli plugin for configuring sw-precache

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to preact-cli-sw-precache

preact-cli-plugin-netlify
Preact cli plugin for generating h2push headers and redirects rules for netlify
Stars: ✭ 25 (+31.58%)
Mutual labels:  preact, preact-cli-plugin
Hydux
A light-weight type-safe Elm-like alternative for Redux ecosystem, inspired by hyperapp and Elmish
Stars: ✭ 216 (+1036.84%)
Mutual labels:  preact
Saka
Elegant tab, bookmark and history search
Stars: ✭ 170 (+794.74%)
Mutual labels:  preact
Recal
A minimal, accessible React/Preact calendar component using modern CSS.
Stars: ✭ 191 (+905.26%)
Mutual labels:  preact
Preact Render Spy
Render preact components with access to the produced virtual dom for testing.
Stars: ✭ 178 (+836.84%)
Mutual labels:  preact
Preact Worker Demo
Demo of preact rendering an entire app in a Web Worker.
Stars: ✭ 204 (+973.68%)
Mutual labels:  preact
Jsxstyle
Inline style system for React and Preact
Stars: ✭ 1,990 (+10373.68%)
Mutual labels:  preact
Rex Tils
Type safe utils for redux actions, epics, effects, react/preact default props, various type guards and TypeScript utils, React util components
Stars: ✭ 245 (+1189.47%)
Mutual labels:  preact
Preact Custom Element
Wrap your component up as a custom element
Stars: ✭ 212 (+1015.79%)
Mutual labels:  preact
Bolt
The Bolt Design System provides robust Twig and Web Component-powered UI components, reusable visual styles, and powerful tooling to help developers, designers, and content authors build, maintain, and scale best of class digital experiences.
Stars: ✭ 186 (+878.95%)
Mutual labels:  preact
Zero To Preact
A Step-by-step Guide to Preact + Webpack 2, without boilerplate!
Stars: ✭ 185 (+873.68%)
Mutual labels:  preact
Preact Mdl
💥 A collection of Preact Components that encapsulate Google's Material Design Lite.
Stars: ✭ 179 (+842.11%)
Mutual labels:  preact
Preact Devtools
Browser extension for inspection Preact applications
Stars: ✭ 204 (+973.68%)
Mutual labels:  preact
State Machine Component
⚙️ State machine -powered components in 250 bytes
Stars: ✭ 178 (+836.84%)
Mutual labels:  preact
Facebook Political Ads
Monitoring Facebook Political Ads
Stars: ✭ 215 (+1031.58%)
Mutual labels:  preact
Electrode
Web applications with node.js and React
Stars: ✭ 2,033 (+10600%)
Mutual labels:  preact
Vaporboy
Gameboy / Gameboy Color Emulator PWA built with Preact. ⚛️ Powered by wasmBoy. 🎮Themed with VaporWave. 🌴🐬
Stars: ✭ 182 (+857.89%)
Mutual labels:  preact
Preact Redux Example
🔁 Preact + Redux Example Project
Stars: ✭ 199 (+947.37%)
Mutual labels:  preact
Prefresh
Hot Module Reloading for Preact
Stars: ✭ 247 (+1200%)
Mutual labels:  preact
React
MOVED TO https://github.com/myitcv/x/blob/master/react/_doc/README.md
Stars: ✭ 234 (+1131.58%)
Mutual labels:  preact

preact-cli-sw-precache

Preact cli plugin for configuring sw-precache.

This plugin allows you to customize the behaviour of auto bundled sw-precache module. You can specify all the custom config that sw-precache accepts and hence make your service worker more powerful.

Getting started

npm i -D preact-cli-sw-precache

Example

In order to provide custom confguration, add the following code to preact.config.js. 👇

const preactCliSwPrecachePlugin = require('preact-cli-sw-precache');

export default function (config) {
  const precacheConfig = {
    staticFileGlobs: [
      'app/css/**.css',
      'app/**.html',
      'app/images/**.*',
      'app/js/**.js'
    ],
    stripPrefix: 'app/',
    runtimeCaching: [{
      urlPattern: /this\\.is\\.a\\.regex/,
      handler: 'networkFirst'
    }]
  };

  return preactCliSwPrecachePlugin(config, precacheConfig);
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].