vshjxyz / appcache-webpack-plugin

Generate an HTML5 Application Cache for a Webpack build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Application Cache plugin for Webpack

Usage

var AppCachePlugin = require('appcache-webpack-plugin');

module.exports = {
  plugins: [
    new AppCachePlugin({
      cache: ['someOtherAsset.jpg'],
      network: null,  // No network access allowed!
      fallback: ['failwhale.jpg'],
      settings: ['prefer-online']
    })
  ]
}

Arguments:

  • cache: An array of additional assets to cache.
  • network: An array of assets that may be accessed via the network. Defaults to ['*'].
  • fallback: An array of fallback assets.
  • settings: An array of settings.

License

MIT

About

Generate an HTML5 Application Cache for a Webpack build


Languages

Language:CoffeeScript 98.4%Language:JavaScript 1.6%