{"id":18961,"library":"appcache-webpack-plugin","title":"AppCache Webpack Plugin","description":"Webpack plugin (v1.4.0, last updated 2016) to generate HTML5 Application Cache manifests (.appcache) for offline web apps. Supports cache, network, fallback, settings, and exclude options. Deprecated due to the HTML5 AppCache spec being removed from browsers. Alternatives: Service Workers. Webpack peer dependency: >=0.11 <=4.x.x.","status":"deprecated","version":"1.4.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/lettertwo/appcache-webpack-plugin","tags":["javascript","webpack","appcache","application","cache","plugin"],"install":[{"cmd":"npm install appcache-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add appcache-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add appcache-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin integration","package":"webpack","optional":false}],"imports":[{"note":"CommonJS only; no ESM export.","wrong":"import AppCachePlugin from 'appcache-webpack-plugin';","symbol":"AppCachePlugin","correct":"const AppCachePlugin = require('appcache-webpack-plugin');"},{"note":"Use require, not import.","wrong":"import AppCachePlugin from 'appcache-webpack-plugin';","symbol":"require('appcache-webpack-plugin')","correct":"const AppCachePlugin = require('appcache-webpack-plugin');"},{"note":"Must be instantiated with `new`.","wrong":"AppCachePlugin()","symbol":"plugin instantiation","correct":"new AppCachePlugin({ ... })"}],"quickstart":{"code":"const HtmlWebpackPlugin = require('html-webpack-plugin');\nconst AppCachePlugin = require('appcache-webpack-plugin');\n\nmodule.exports = {\n  entry: './app.js',\n  output: {\n    path: './dist',\n    filename: 'bundle.js'\n  },\n  plugins: [\n    new HtmlWebpackPlugin(),\n    new AppCachePlugin({\n      cache: ['image.jpg'],\n      network: ['*'],\n      fallback: ['fallback.html'],\n      settings: ['prefer-online'],\n      exclude: ['file.txt', /.*\\.js$/],\n      output: 'my-app.appcache'\n    })\n  ]\n};","lang":"javascript","description":"Generates an appcache manifest with custom cache, network, fallback, exclude patterns, and output filename."},"warnings":[{"fix":"Migrate to a service worker plugin like workbox-webpack-plugin.","message":"HTML5 Application Cache (AppCache) is deprecated and removed from modern browsers. Use Service Workers instead.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Add manifest='my-manifest.appcache' to the <html> tag in your HTML template.","message":"The plugin outputs an .appcache file but does not update the HTML <html> manifest attribute automatically. You must do that manually or via another plugin.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Explicitly set `network: ['*']` or `network: null` based on desired behavior.","message":"If `network` option is not set, it defaults to ['*']; if you set it to null or an empty array, no network access is allowed.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use an alternative plugin like serviceworker-webpack-plugin or workbox-webpack-plugin.","message":"Webpack 5 is not supported; this plugin only works with webpack <=4.x.x.","severity":"breaking","affected_versions":">=1.0.0 <=1.4.0"},{"fix":"Double-check exclude patterns to ensure critical assets are not omitted.","message":"Exclude patterns: if you exclude .js files via /.*\\.js$/, the bundle itself (a .js file) will be excluded from the manifest, which may not be intended.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install appcache-webpack-plugin --save-dev","cause":"npm package not installed.","error":"Cannot find module 'appcache-webpack-plugin'"},{"fix":"Use `const AppCachePlugin = require('appcache-webpack-plugin');` and instantiate with `new`.","cause":"Using default import instead of require, or missing `new` keyword.","error":"TypeError: AppCachePlugin is not a constructor"},{"fix":"Downgrade webpack to 4.x.x or use a different plugin that supports your webpack version.","cause":"Incompatible webpack version.","error":"Error: webpack <version> does not support this plugin. Ensure webpack version is >=0.11 and <=4.x.x."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}