9.0.3 • Published 7 years ago

poi-preset-offline v9.0.3

Weekly downloads
28
License
MIT
Repository
github
Last release
7 years ago

poi-preset-offline

Add offline support to your app.

Install

yarn add offline-plugin
yarn add poi-preset-offline --dev

Usage

// poi.config.js
module.exports = {
  presets: [
    require('poi-preset-offline')(options)
  ]
}

API

offlinePreset

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-preset-offline')({
  pwa: './src/pwa.js' // Use your own runtime, relative to $cwd
})

License

MIT © EGOIST

9.0.3

7 years ago

9.0.2

7 years ago

9.0.1

7 years ago

9.0.0

7 years ago

9.0.0-rc.1

7 years ago

8.0.3

7 years ago

8.0.2

7 years ago

8.0.1

7 years ago

8.0.0

7 years ago