https://github.com/lwd-technology/appcache-webpack-plugin-plus
Generate an application cache for a Webpack build
https://github.com/lwd-technology/appcache-webpack-plugin-plus
appcache appcache-manifest webpack
Last synced: 11 months ago
JSON representation
Generate an application cache for a Webpack build
- Host: GitHub
- URL: https://github.com/lwd-technology/appcache-webpack-plugin-plus
- Owner: lwd-technology
- License: mit
- Created: 2017-09-19T07:23:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-20T01:53:46.000Z (over 8 years ago)
- Last Synced: 2025-03-01T04:13:23.925Z (12 months ago)
- Topics: appcache, appcache-manifest, webpack
- Language: TypeScript
- Size: 101 KB
- Stars: 2
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# appcache-webpack-plugin-plus
Derived from the original [`appcache-webpack-plugin`](https://github.com/lettertwo/appcache-webpack-plugin), but updated and converted to Typescript.
## Usage
```javascript
// Note the `.default`!
const AppcachePlugin = require('appcache-webpack-plugin-plus').default
module.exports = {
plugins: [
new AppcachePlugin({
cache: ['someOtherAsset.jpg'],
network: [], // 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. Defaults to `[]`.
* `network`: An array of assets that may be accessed via the network.
Defaults to `['*']`.
* `fallback`: An array of fallback assets. Defaults to `[]`.
* `settings`: An array of settings. Defaults to `[]`.
* `exclude`: An array of strings or regex patterns. Assets in the compilation
that match any of these patterns will be excluded from the manifest. Defaults to `[]`.
* `output`: The filename to write the appcache. Defaults to `manifest.appcache`.