offline-plugin
offline-plugin for webpack
Last updated 8 years ago by nekr .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install offline-plugin 
SYNC missed versions from official npm registry.

offline-plugin logo

offline-plugin for webpack

backers sponsors npm npm


This plugin is intended to provide an offline experience for webpack projects. It uses ServiceWorker, and AppCache as a fallback under the hood. Simply include this plugin in your webpack.config, and the accompanying runtime in your client script, and your project will become offline ready by caching all (or some) of the webpack output assets.

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site.
Become a sponsor

Install

npm install offline-plugin [--save-dev]

Setup

First, instantiate the plugin in your webpack.config:

// webpack.config.js example

var OfflinePlugin = require('offline-plugin');

module.exports = {
  // ...

  plugins: [
    // ... other plugins
    // it's always better if OfflinePlugin is the last plugin added
    new OfflinePlugin()
  ]
  // ...
}

(and optionally configure with options)

Then, add the runtime into your entry file (typically main entry):

require('offline-plugin/runtime').install();

ES6/Babel/TypeScript

import * as OfflinePluginRuntime from 'offline-plugin/runtime';
OfflinePluginRuntime.install();

For more details of usage with TypeScript see here

offline-plugin isn't working?

:information_source: Troubleshooting | FAQ

Docs

Examples

Articles

Options

All options are optional and offline-plugin can be used without specifying them.

See all available options here.

Who is using offline-plugin

Demo:
Progressive Web App built with offline-plugin

Projects

PWAs

If you are using offline-plugin, feel free to submit a PR to add your project to this list.

Like offline-plugin?

Support it by giving feedback, contributing, becoming a backer/sponsor or just by 🌟 starring the project!

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Contribution

See CONTRIBUTING

License

MIT
Logo

CHANGELOG

CHANGELOG

Current Tags

  • 5.0.7                                ...           latest (6 years ago)
  • 5.0.0-0                                ...           next (7 years ago)
  • 4.5.0                                ...           unstable (8 years ago)

74 Versions

  • 5.0.7                                ...           6 years ago
  • 5.0.6                                ...           6 years ago
  • 5.0.5                                ...           6 years ago
  • 5.0.4                                ...           6 years ago
  • 5.0.3                                ...           7 years ago
  • 5.0.2                                ...           7 years ago
  • 5.0.1                                ...           7 years ago
  • 5.0.0                                ...           7 years ago
  • 4.9.1                                ...           7 years ago
  • 5.0.0-0                                ...           7 years ago
  • 4.9.0                                ...           7 years ago
  • 4.8.5                                ...           7 years ago
  • 4.8.4                                ...           7 years ago
  • 4.8.3                                ...           7 years ago
  • 4.8.3-0                                ...           7 years ago
  • 4.8.2                                ...           7 years ago
  • 4.8.1                                ...           7 years ago
  • 4.8.0                                ...           7 years ago
  • 4.7.0                                ...           8 years ago
  • 4.6.2                                ...           8 years ago
  • 4.6.1                                ...           8 years ago
  • 4.6.0                                ...           8 years ago
  • 4.5.5                                ...           8 years ago
  • 4.5.4                                ...           8 years ago
  • 4.5.3                                ...           8 years ago
  • 4.5.2                                ...           8 years ago
  • 4.5.1                                ...           8 years ago
  • 4.5.0                                ...           8 years ago
  • 4.5.0-beta.6                                ...           8 years ago
  • 4.5.0-beta.5                                ...           8 years ago
  • 4.5.0-beta.4                                ...           8 years ago
  • 4.5.0-beta.3                                ...           8 years ago
  • 4.5.0-beta.2                                ...           8 years ago
  • 4.5.0-beta.1                                ...           8 years ago
  • 4.5.0-beta                                ...           8 years ago
  • 4.4.1                                ...           8 years ago
  • 4.4.0                                ...           8 years ago
  • 4.3.1                                ...           8 years ago
  • 4.3.0                                ...           8 years ago
  • 4.2.1                                ...           8 years ago
  • 4.2.0                                ...           8 years ago
  • 4.1.0                                ...           8 years ago
  • 4.0.0                                ...           8 years ago
  • 3.4.2                                ...           8 years ago
  • 3.4.1                                ...           8 years ago
  • 3.4.0                                ...           8 years ago
  • 3.3.1                                ...           8 years ago
  • 3.3.0                                ...           8 years ago
  • 3.2.1                                ...           9 years ago
  • 3.2.0                                ...           9 years ago
  • 2.2.1                                ...           9 years ago
  • 2.2.0                                ...           9 years ago
  • 3.1.1                                ...           9 years ago
  • 3.1.0                                ...           9 years ago
  • 2.1.1                                ...           9 years ago
  • 3.0.1                                ...           9 years ago
  • 3.0.0                                ...           9 years ago
  • 2.1.0                                ...           9 years ago
  • 2.0.4                                ...           9 years ago
  • 2.0.3                                ...           9 years ago
  • 2.0.2                                ...           9 years ago
  • 2.0.1                                ...           9 years ago
  • 2.0.0                                ...           9 years ago
  • 1.3.1                                ...           9 years ago
  • 1.3.0                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.3                                ...           9 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 0.0.2                                ...           9 years ago
  • 0.0.1                                ...           9 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (7)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE