Détail du package

appcache-webpack-plugin

lettertwo14.3kMIT1.4.0

Generate an HTML5 Application Cache for a Webpack build

webpack, appcache, application, cache

readme

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

changelog

1.4.0

  • Support webpack 4.0 tapable api

1.3.0

  • Include support for webpack 2
  • Add a comment option

1.2.1

  • Fix URL concatenation

1.2.0

  • Allow configuration of output filename

1.1.0

  • Prepend manifest entries with output publicPath

1.0.0

  • Implement exclude option. Assets can now be excluded from the manifest!
  • Re-implement in ES6!

0.2.0

  • Settings are now expected to be a list, not an options-style object.
  • Added support for a SETTINGS section with option 'prefer-online'.
  • Encode explicit URIs in manifests.

0.1.1

  • Fix node installs

0.1.0

  • Initial implementation
  • Project skeleton