Skip to content

Commit

Permalink
fix: PWA manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
tymmesyde committed Dec 7, 2023
1 parent b665342 commit 9893bb8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Binary file removed favicons/icon-96.png
Binary file not shown.
Binary file modified images/maskable_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Stremio">
<link rel="icon" type="image/png" sizes="96x96" href="<%= htmlWebpackPlugin.options.faviconsPath %>/icon-96.png">
<meta name="theme-color" content="<%= htmlWebpackPlugin.options.themeColor %>">
<link rel="icon" type="image/x-icon" href="<%= htmlWebpackPlugin.options.faviconsPath %>/favicon.ico">
<title>Stremio - Freedom to Stream</title>
<%= htmlWebpackPlugin.tags.headTags %>
</head>
Expand Down
17 changes: 10 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const WorkboxPlugin = require('workbox-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const WebpackPwaManifest = require('webpack-pwa-manifest');
const colors = require('@stremio/stremio-colors');
const pachageJson = require('./package.json');

const COMMIT_HASH = execSync('git rev-parse HEAD').toString().trim();
Expand Down Expand Up @@ -200,6 +199,7 @@ module.exports = (env, argv) => ({
patterns: [
{ from: 'favicons', to: `${COMMIT_HASH}/favicons` },
{ from: 'images', to: `${COMMIT_HASH}/images` },
{ from: 'screenshots/*.webp', to: `${COMMIT_HASH}` },
]
}),
new MiniCssExtractPlugin({
Expand All @@ -209,7 +209,6 @@ module.exports = (env, argv) => ({
template: './src/index.html',
inject: false,
scriptLoading: 'blocking',
themeColor: colors.background,
faviconsPath: `${COMMIT_HASH}/favicons`,
imagesPath: `${COMMIT_HASH}/images`,
}),
Expand All @@ -221,26 +220,30 @@ module.exports = (env, argv) => ({
theme_color: '#2a2843',
orientation: 'any',
display: 'standalone',
start_url: './',
display_override: ['standalone'],
scope: './',
start_url: './',
publicPath: './',
icons: [
{
src: 'images/icon.png',
destination: `${COMMIT_HASH}/images`,
sizes: [196, 512],
ios: true
purpose: 'any',
ios: true,
},
{
src: 'images/maskable_icon.png',
destination: `${COMMIT_HASH}/images`,
sizes: [196, 512],
purpose: 'maskable',
destination: path.join(COMMIT_HASH, 'images', 'maskable')
},
{
src: 'favicons/favicon.ico',
sizes: [64, 32, 24, 16]
destination: `${COMMIT_HASH}/favicons`,
sizes: [256],
}
].map(icon => ({ ...icon, destination: icon.destination ?? path.join(COMMIT_HASH, 'images') })),
],
fingerprints: false,
ios: true
}),
Expand Down

0 comments on commit 9893bb8

Please sign in to comment.