10.0.0-alpha.0 • Published 6 years ago

poi-plugin-offline v10.0.0-alpha.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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 Object
    • options.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, default path.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