poi-plugin-offline
v10.0.0-alpha.0
Published
Add offline support to your app.
Downloads
3
Readme
poi-plugin-offline
Add offline support to your app.
Install
yarn add offline-plugin
yarn add poi-plugin-offline --dev
Usage
// poi.config.js
module.exports = {
plugins: [
require('poi-plugin-offline')(options)
]
}
API
Table of Contents
offlinePlugin
Add offline support to your app
Parameters
options
Objectoptions.entry
String Specific the entry to add offline-plugin runtime file. (optional, default'client'
)options.pwa
string Path to your offline-plugin runtime file.See ./pwa.js for built-in runtime entry. (optional, defaultpath.join(__dirname,'pwa.js')
)options.pluginOptions
Object Options for offline-plugin.See offline-plugin docs for details. (optional, default{ ServiceWorker:{ events:true, navigateFallbackURL:'/' }, AppCache:{ events:true, FALLBACK:{'/':'/'} } }
)
Examples
require('poi-plugin-offline')({
pwa: './src/pwa.js' // Use your own runtime, relative to $cwd
})
License
MIT © EGOIST