appcache-webpack-plugin
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/appcache-webpack-plugin package

1.4.0 • Public • Published

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'],
      exclude: ['file.txt', /.*\.js$/],  // Exclude file.txt and all .js files
      output: 'my-manifest.appcache'
    })
  ]
}

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.
  • exclude: An array of strings or regex patterns. Assets in the compilation that match any of these patterns will be excluded from the manifest.
  • output: The filename to write the appcache to

License

MIT

Package Sidebar

Install

npm i appcache-webpack-plugin

Weekly Downloads

2,768

Version

1.4.0

License

MIT

Unpacked Size

7.65 kB

Total Files

4

Last publish

Collaborators

  • lettertwo