Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork291
Offline plugin (ServiceWorker, AppCache) for webpack (https://webpack.js.org/)
License
NekR/offline-plugin
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This plugin is intended to provide an offline experience forwebpack projects. It usesServiceWorker, andAppCache as a fallback under the hood. Simply include this plugin in yourwebpack.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.
Become a sponsor and get your logo on our README on Github with a link to your site.
Become a sponsor
npm install offline-plugin [--save-dev]
First, instantiate the plugin in yourwebpack.config
:
// webpack.config.js examplevarOfflinePlugin=require('offline-plugin');module.exports={// ...plugins:[// ... other plugins// it's always better if OfflinePlugin is the last plugin addednewOfflinePlugin()]// ...}
(and optionally configure withoptions)
Then, add theruntime into your entry file (typically main entry):
require('offline-plugin/runtime').install();
ES6/Babel/TypeScript
import*asOfflinePluginRuntimefrom'offline-plugin/runtime';OfflinePluginRuntime.install();
For more details of usage with
TypeScript
seehere
- Easy Offline First Apps With Webpack's Offline Plugin
- Handling Client Side App Updates (with Service Workers)
All options are optional andoffline-plugin
can be used without specifying them.
offline-plugin
PWA- Omroep West
- Preact (source)
- CodePan (source)
- Offline Kanban (source)
- Online Board (source)
- Fluid Outliner (source)
If you are usingoffline-plugin
, feel free to submit a PR to add your project to this list.
Support it by givingfeedback,contributing, becoming abacker/sponsor or just by 🌟 starring the project!
Support us with a monthly donation and help us continue our activities. [Become a backer]
SeeCONTRIBUTING
About
Offline plugin (ServiceWorker, AppCache) for webpack (https://webpack.js.org/)
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.