Progressive Web App Manifest Generator for Webpack, with auto icon resizing and fingerprinting support.
Installations
npm install webpack-pwa-manifest
Developer Guide
Typescript
Yes
Module System
CommonJS
Min. Node Version
>=6.0.0
Node Version
14.0.0
NPM Version
6.14.4
Score
85.1
Supply Chain
88.5
Quality
75.9
Maintenance
50
Vulnerability
97.9
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (83.77%)
HTML (16.23%)
Developer
arthurbergmz
Download Statistics
Total Downloads
16,472,967
Last Day
1,438
Last Week
42,859
Last Month
174,557
Last Year
2,369,361
GitHub Statistics
514 Stars
171 Commits
93 Forks
8 Watching
12 Branches
19 Contributors
Bundle Size
435.46 kB
Minified
132.67 kB
Minified + Gzipped
Package Meta Information
Latest Version
4.3.0
Package Id
webpack-pwa-manifest@4.3.0
Size
71.32 kB
NPM Version
6.14.4
Node Version
14.0.0
Publised On
17 Nov 2020
Total Downloads
Cumulative downloads
Total Downloads
16,472,967
Last day
31.6%
1,438
Compared to previous day
Last week
-1.1%
42,859
Compared to previous week
Last month
-5.2%
174,557
Compared to previous month
Last year
-27%
2,369,361
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
webpack-pwa-manifest
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 plugins
array!
features
✔ Auto icon resizing
✔ Icon fingerprinting
✔ Manifest fingerprinting
✔ Auto manifest injection on HTML
✔ Hot Reload support
✔ ES6+ ready
install
1npm install --save-dev webpack-pwa-manifest
usage
In your webpack.config.js
:
1// ES6+ 2import WebpackPwaManifest from 'webpack-pwa-manifest' 3 4// ES5 5var WebpackPwaManifest = require('webpack-pwa-manifest') 6 7... 8 9plugins: [ 10 new WebpackPwaManifest({ 11 name: 'My Progressive Web App', 12 short_name: 'MyPWA', 13 description: 'My awesome Progressive Web App!', 14 background_color: '#ffffff', 15 crossorigin: 'use-credentials', //can be null, use-credentials or anonymous 16 icons: [ 17 { 18 src: path.resolve('src/assets/icon.png'), 19 sizes: [96, 128, 192, 256, 384, 512] // multiple sizes 20 }, 21 { 22 src: path.resolve('src/assets/large-icon.png'), 23 size: '1024x1024' // you can also use the specifications pattern 24 }, 25 { 26 src: path.resolve('src/assets/maskable-icon.png'), 27 size: '1024x1024', 28 purpose: 'maskable' 29 } 30 ] 31 }) 32]
output
manifest.<fingerprint>.json
1{ 2 "name": "My Progressive Web App", 3 "orientation": "portrait", 4 "display": "standalone", 5 "start_url": ".", 6 "short_name": "MyPWA", 7 "description": "My awesome Progressive Web App!", 8 "background_color": "#ffffff", 9 "icons": [ 10 { 11 "src": "icon_1024x1024.<fingerprint>.png", 12 "sizes": "1024x1024", 13 "type": "image/png", 14 "purpose": "maskable" 15 }, 16 { 17 "src": "icon_1024x1024.<fingerprint>.png", 18 "sizes": "1024x1024", 19 "type": "image/png" 20 }, 21 { 22 "src": "icon_512x512.<fingerprint>.png", 23 "sizes": "512x512", 24 "type": "image/png" 25 }, 26 { 27 "src": "icon_384x384.<fingerprint>.png", 28 "sizes": "384x384", 29 "type": "image/png" 30 }, 31 { 32 "src": "icon_256x256.<fingerprint>.png", 33 "sizes": "256x256", 34 "type": "image/png" 35 }, 36 { 37 "src": "icon_192x192.<fingerprint>.png", 38 "sizes": "192x192", 39 "type": "image/png" 40 }, 41 { 42 "src": "icon_128x128.<fingerprint>.png", 43 "sizes": "128x128", 44 "type": "image/png" 45 }, 46 { 47 "src": "icon_96x96.<fingerprint>.png", 48 "sizes": "96x96", 49 "type": "image/png" 50 } 51 ] 52}
API
WebpackPwaManifest([options])
options
Type: object
You can follow the Web App Manifest specification.
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
property.
Presets of options
:
1{ 2 filename: "manifest.json", 3 name: "App", 4 orientation: "portrait", 5 display: "standalone", 6 start_url: ".", 7 crossorigin: null, 8 inject: true, 9 fingerprints: true, 10 ios: false, 11 publicPath: null, 12 includeDirectory: true 13}
By default, HTML injection and fingerprint generation are on.
With inject: false
and fingerprints: false
, respectively, you can turn them off.
If 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.
With includeDirectory: true
, we will use filename
's directory to export the manifest file.
With orientation: 'omit'
, the orientation key will be omitted from the generated manifest file.
When 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:
1 ... 2 ios: { 3 'apple-mobile-web-app-title': 'AppTitle', 4 'apple-mobile-web-app-status-bar-style': 'black' 5 }
If 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 destination
. Using 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.
1 ... 2 icons: [ 3 { 4 src: path.resolve('src/assets/icons/ios-icon.png'), 5 sizes: [120, 152, 167, 180, 1024], 6 destination: path.join('icons', 'ios'), 7 ios: true 8 }, 9 { 10 src: path.resolve('src/assets/icons/ios-icon.png'), 11 size: 1024, 12 destination: path.join('icons', 'ios'), 13 ios: 'startup' 14 }, 15 { 16 src: path.resolve('src/assets/icons/android-icon.png'), 17 sizes: [36, 48, 72, 96, 144, 192, 512], 18 destination: path.join('icons', 'android') 19 } 20 ] 21}
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.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 7/18 approved changesets -- score normalized to 3
Reason
project is archived
Details
- Warn: Repository is archived.
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 21 are checked with a SAST tool
Reason
28 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-xvf7-4v9q-58w6
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-x565-32qp-m3vf
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc
Score
2.1
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to webpack-pwa-manifest
favicons-webpack-plugin
Let webpack generate all your favicons and icons for you
pwa-manifest-webpack-plugin
generating `manifest.json` for pwa app
@expo/webpack-pwa-manifest-plugin
Generates a progressive web app (PWA) manifest.json from a React Native app.json
webapp-webpack-plugin
Let webpack generate your progressive web app icons for you