Gathering detailed insights and metrics for app-manifest-webpack-plugin
Gathering detailed insights and metrics for app-manifest-webpack-plugin
Gathering detailed insights and metrics for app-manifest-webpack-plugin
Gathering detailed insights and metrics for app-manifest-webpack-plugin
webapp-webpack-plugin
Let webpack generate your progressive web app icons for you
@talend/dynamic-cdn-webpack-plugin
Dynamically get your dependencies from a cdn rather than bundling them in your app
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
npm install app-manifest-webpack-plugin
Typescript
Module System
Min. Node Version
Node Version
NPM Version
37.5
Supply Chain
53.7
Quality
64
Maintenance
25
Vulnerability
92.3
License
JavaScript (100%)
Total Downloads
306,888
Last Day
7
Last Week
42
Last Month
270
Last Year
15,248
27 Stars
89 Commits
12 Forks
2 Watching
2 Branches
1 Contributors
Latest Version
1.2.2
Package Id
app-manifest-webpack-plugin@1.2.2
Unpacked Size
28.63 kB
Size
9.24 kB
File Count
8
NPM Version
6.14.8
Node Version
13.14.0
Cumulative downloads
Total Downloads
Last day
-30%
7
Compared to previous day
Last week
-25%
42
Compared to previous week
Last month
-22.4%
270
Compared to previous month
Last year
-28.5%
15,248
Compared to previous year
2
1
22
This is fork of jantimon/favicons-webpack-plugin with improvements:
favicons
packageAllows to use the favicons generator with webpack.
This plugin also generates manifest files:
manifest.json
browserconfig.xml
yandex-browser-manifest.json
You must be running webpack (version ^2.x)
on node (version ^6.14.1)
Install:
1npm install --save-dev app-manifest-webpack-plugin
Install with yarn:
1yarn add -D app-manifest-webpack-plugin
Add the plugin to your webpack config as follows:
1const AppManifestWebpackPlugin = require('app-manifest-webpack-plugin') 2 3... 4 5plugins: [ 6 new AppManifestWebpackPlugin({ 7 logo: 'my-logo.png', 8 inject: false, 9 }) 10]
This basic configuration will generate 37 different icons for iOS devices, Android devices and the Desktop browser out of your my-logo.png
file.
It can optionally also generate a iconstats.json
for you.
html-webpack-plugin
If you are using with html-webpack-plugin it will also inject the necessary html for you:
1 <link rel="apple-touch-icon" sizes="57x57" href="icons-366a3768de05f9e78c392fa62b8fbb80/apple-touch-icon-57x57.png"> 2 <link rel="apple-touch-icon" sizes="60x60" href="icons-366a3768de05f9e78c392fa62b8fbb80/apple-touch-icon-60x60.png"> 3 <link rel="apple-touch-icon" sizes="72x72" href="icons-366a3768de05f9e78c392fa62b8fbb80/apple-touch-icon-72x72.png"> 4 ... 5 ... 6 <link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" href="icons-366a3768de05f9e78c392fa62b8fbb80/apple-touch-startup-image-1536x2008.png">
1plugins: [ 2 new HtmlWebpackPlugin(), 3 // Make sure that AppManifestWebpackPlugin below HtmlWebpackPlugin 4 new AppManifestWebpackPlugin({ 5 logo: 'my-logo.png', 6 statsFilename: 'iconstats.json', 7 persistentCache: false, 8 config: { 9 path: '/static/assets/', 10 }, 11 }), 12]
1plugins: [ 2 new AppManifestWebpackPlugin({ 3 // Your source logo 4 logo: 'my-logo.png', 5 // Prefix for file names 6 prefix: '/assets/icons-[hash:8]/', // default '/' 7 // Output path for icons (icons will be saved to output.path(webpack config) + this key) 8 output: '/icons-[hash:8]/', // default '/'. Can be absolute or relative 9 // Emit all stats of the generated icons 10 emitStats: false, 11 // The name of the json containing all favicon information 12 statsFilename: 'iconstats.json', // can be absolute path 13 // Encode html entities in stats file (Example json_decode from php doesn't support html strings with escaped double quotes but it's valid json) 14 statsEncodeHtml: false, 15 // Generate a cache file with control hashes and 16 // don't rebuild the favicons until those hashes change 17 persistentCache: true, 18 // Inject the html into the html-webpack-plugin. Default true 19 inject: true, 20 // favicons configuration object. Support all keys of favicons (see https://github.com/haydenbleasel/favicons) 21 config: { 22 loadManifestWithCredentials: true, // use crossOrigin="use-credentials" for link tag with manifest 23 appName: 'Webpack App', // Your application's name. `string` 24 appDescription: null, // Your application's description. `string` 25 developerName: null, // Your (or your developer's) name. `string` 26 developerURL: null, // Your (or your developer's) URL. `string` 27 background: '#fff', // Background colour for flattened icons. `string` 28 theme_color: '#fff', // Theme color for browser chrome. `string` 29 display: 'standalone', // Android display: "browser" or "standalone". `string` 30 orientation: 'portrait', // Android orientation: "portrait" or "landscape". `string` 31 start_url: '/?homescreen=1', // Android start application's URL. `string` 32 version: '1.0', // Your application's version number. `number` 33 logging: false, // Print logs to console? `boolean` 34 icons: { 35 // Platform Options: 36 // - offset - offset in percentage 37 // - shadow - drop shadow for Android icons, available online only 38 // - background: 39 // * false - use default 40 // * true - force use default, e.g. set background for Android icons 41 // * color - set background for the specified icons 42 // 43 android: true, // Create Android homescreen icon. `boolean` or `{ offset, background, shadow }` 44 appleIcon: true, // Create Apple touch icons. `boolean` or `{ offset, background }` 45 appleStartup: true, // Create Apple startup images. `boolean` or `{ offset, background }` 46 coast: { offset: 25 }, // Create Opera Coast icon with offset 25%. `boolean` or `{ offset, background }` 47 favicons: true, // Create regular favicons. `boolean` 48 firefox: true, // Create Firefox OS icons. `boolean` or `{ offset, background }` 49 windows: true, // Create Windows 8 tile icons. `boolean` or `{ background }` 50 yandex: true, // Create Yandex browser icon. `boolean` or `{ background }` 51 }, 52 } 53 }) 54]
This options help you save output files or change paths to icons in your html as you want.
Example you want save output icons to icons/
directory in your build path but in html you want set another prefix for files, example /assets/webpack/icons/
when you can use options for this
1 new AppManifestWebpackPlugin({ 2 // Your source logo 3 logo: 'my-logo.png', 4 // Prefix for file names (html will be container icons with this prefix) 5 prefix: '/assets/webpack/', 6 // Output path for icons (icons will be saved to output.path(webpack config) + this key) 7 output: '/icons-[hash:8]/' 8 })
html file will be contains current paths
1<link rel="apple-touch-icon" sizes="120x120" href="/assets/webpack/icons-4b62aad7/apple-touch-icon-120x120.png"> 2<link rel="apple-touch-icon" sizes="144x144" href="/assets/webpack/icons-4b62aad7/apple-touch-icon-144x144.png"> 3<link rel="apple-touch-icon" sizes="152x152" href="/assets/webpack/icons-4b62aad7/apple-touch-icon-152x152.png"> 4<link rel="apple-touch-icon" sizes="180x180" href="/assets/webpack/icons-4b62aad7/apple-touch-icon-180x180.png">
but files will be saved to /icons-4b62aad7/
directory and you iconstats.json
contains correct outputFilePrefix
1{ "outputFilePrefix":"/assets/webpack/icons-4b62aad7/" }
prefix
change filenames inside html, output
it is the path where icons wiil be savedoutput
and want set corrent path in the manifest files and html files1 new AppManifestWebpackPlugin({ 2 // Your source logo 3 logo: 'my-logo.png', 4 // Output path can be relative. Icons will be saved to webpack output directory + output 5 output: '../icons/', 6 // Change prefix of files for correct paths in your html and manifest files 7 prefix: '/icons/' 8 })
When you use option emitStats
the plugin is generated stats file with statsFilename
and contains usefull data
1{ 2 "outputFilePrefix":"/", 3 "html": [], // array of html strings 4 "files": [], // array of generated icon names 5 "encodedHtml": "", // endoded html string if you use statsEncodeHtml option 6} 7
Take a look at the CHANGELOG.md.
You're free to contribute to this project by submitting issues and/or pull requests. This project is test-driven, so keep in mind that every change and new feature should be covered by tests. This project uses the semistandard code style.
This project is licensed under MIT.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/27 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
85 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-30
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 More