Used to enable appcache for your application.
All compiled assets will be recorded in the application cache manifest, including JS bundles, CSS files, HTML, and other files, so long as you have the correct plugins installed for the file-types in use. All HTML files will be modified to reference the generated manifest.
Additionally, a "build hash" will be added to the manifest. This hash is deterministically generated from the output of your build, and its inclusion in the manifest output will indicate that browsers need to update its internal cache for the page.
Make sure you have installed the plugin as a dependency in your project:
$ npm install --save-dev interlock-appcache
Then, include it in your config:
const appcache = require("interlock-appcache");
module.exports = {
// ... config options
plugins: [
appcache({
// ... your options here
})
// .. other plugins
]
};filename- A string. The filename to use for your application manifest. Defaults tosite.manifest.exclude- An array of regular expressions. If any regexp matches the pathname of a generated resource, it will be omitted from the manifest. Defaults to an empty array.include- An array of strings. Used to xplicitly include resources that are not part of your build (external fonts, for example). Defaults to an empty array.strip- A regular expression. Used to match and remove parts of filenames. This can be used, for example, to removeindex.htmlfrom the cache entry if all links point to the parent directory. Defaults tonull.hash- A string. Used to override the generated build hash. Defaults tonull.