Looking for people willing to help! More info
webpack-pwa-manifest is a webpack plugin that generates a 'manifest.json' for your Progressive Web Application, with auto icon resizing and fingerprinting support.
If you are using
inject on your configuration, ensure that
HtmlWebpackPlugin appears before
WebpackPwaManifest in the
✔ Auto icon resizing
✔ Icon fingerprinting
✔ Manifest fingerprinting
✔ Auto manifest injection on HTML
✔ Hot Reload support
✔ ES6+ ready
npm install --save-dev webpack-pwa-manifest
// ES6+// ES5var WebpackPwaManifest =...plugins:name: 'My Progressive Web App'short_name: 'MyPWA'description: 'My awesome Progressive Web App!'background_color: '#ffffff'crossorigin: 'use-credentials' //can be null, use-credentials or anonymousicons:src: pathsizes: 96 128 192 256 384 512 // multiple sizessrc: pathsize: '1024x1024' // you can also use the specifications patternsrc: pathsize: '1024x1024'purpose: 'maskable'
The difference here is that, when defining icons, you can specify one icon with multiple sizes, using an array of integers, just as the example above.
You can also change the output's filename with the
filename: "manifest.json"name: "App"orientation: "portrait"display: "standalone"start_url: "."crossorigin: nullinject: truefingerprints: trueios: falsepublicPath: nullincludeDirectory: true
By default, HTML injection and fingerprint generation are on.
inject: false and
fingerprints: false, respectively, you can turn them off.
inject: true and
'theme-color' property is not defined, it wil try to use
theme_color as default. Otherwise, no
theme-color meta tag will be injected.
includeDirectory: true, we will use
filename's directory to export the manifest file.
orientation: 'omit', the orientation key will be omitted from the generated manifest file.
inject: true and
ios: true, specific Apple meta tags will be injected to the HTML code when possible, as requested at issue #13. You can see Apple's Configuring Web Application for more information. Instead of using a boolean value, you can also use an object to specify certain link or meta tag, for instance:
...ios:'apple-mobile-web-app-title': 'AppTitle''apple-mobile-web-app-status-bar-style': 'black'
publicPath option is not given, this plugin fallbacks to Webpack's public path definition.
When defining an icon object, you can also specify its output directory using a property called
ios: true in an icon object makes it eligible to the
apple-touch-icon meta tag injection. Using
ios: 'startup' in an icon object makes it eligible to the
apple-touch-startup-image meta tag injection.
...icons:src: pathsizes: 120 152 167 180 1024destination: pathios: truesrc: pathsize: 1024destination: pathios: 'startup'src: pathsizes: 36 48 72 96 144 192 512destination: path}
If you specify a valid
crossorigin property it will be added to the
<link rel="manifest"> in the HTML document.
This property determines if the request for the manifest includes CORS headers and is required if the manifest is located on a different domain or requires authentication.