mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
fix: PWA manifest
This commit is contained in:
parent
b66534241c
commit
9893bb8897
4 changed files with 11 additions and 9 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 7.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 13 KiB |
|
|
@ -6,8 +6,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
|
<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-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-title" content="Stremio">
|
<meta name="apple-mobile-web-app-title" content="Stremio">
|
||||||
<link rel="icon" type="image/png" sizes="96x96" href="<%= htmlWebpackPlugin.options.faviconsPath %>/icon-96.png">
|
<link rel="icon" type="image/x-icon" href="<%= htmlWebpackPlugin.options.faviconsPath %>/favicon.ico">
|
||||||
<meta name="theme-color" content="<%= htmlWebpackPlugin.options.themeColor %>">
|
|
||||||
<title>Stremio - Freedom to Stream</title>
|
<title>Stremio - Freedom to Stream</title>
|
||||||
<%= htmlWebpackPlugin.tags.headTags %>
|
<%= htmlWebpackPlugin.tags.headTags %>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ const WorkboxPlugin = require('workbox-webpack-plugin');
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
const TerserPlugin = require('terser-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
const WebpackPwaManifest = require('webpack-pwa-manifest');
|
const WebpackPwaManifest = require('webpack-pwa-manifest');
|
||||||
const colors = require('@stremio/stremio-colors');
|
|
||||||
const pachageJson = require('./package.json');
|
const pachageJson = require('./package.json');
|
||||||
|
|
||||||
const COMMIT_HASH = execSync('git rev-parse HEAD').toString().trim();
|
const COMMIT_HASH = execSync('git rev-parse HEAD').toString().trim();
|
||||||
|
|
@ -200,6 +199,7 @@ module.exports = (env, argv) => ({
|
||||||
patterns: [
|
patterns: [
|
||||||
{ from: 'favicons', to: `${COMMIT_HASH}/favicons` },
|
{ from: 'favicons', to: `${COMMIT_HASH}/favicons` },
|
||||||
{ from: 'images', to: `${COMMIT_HASH}/images` },
|
{ from: 'images', to: `${COMMIT_HASH}/images` },
|
||||||
|
{ from: 'screenshots/*.webp', to: `${COMMIT_HASH}` },
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
|
|
@ -209,7 +209,6 @@ module.exports = (env, argv) => ({
|
||||||
template: './src/index.html',
|
template: './src/index.html',
|
||||||
inject: false,
|
inject: false,
|
||||||
scriptLoading: 'blocking',
|
scriptLoading: 'blocking',
|
||||||
themeColor: colors.background,
|
|
||||||
faviconsPath: `${COMMIT_HASH}/favicons`,
|
faviconsPath: `${COMMIT_HASH}/favicons`,
|
||||||
imagesPath: `${COMMIT_HASH}/images`,
|
imagesPath: `${COMMIT_HASH}/images`,
|
||||||
}),
|
}),
|
||||||
|
|
@ -221,26 +220,30 @@ module.exports = (env, argv) => ({
|
||||||
theme_color: '#2a2843',
|
theme_color: '#2a2843',
|
||||||
orientation: 'any',
|
orientation: 'any',
|
||||||
display: 'standalone',
|
display: 'standalone',
|
||||||
start_url: './',
|
display_override: ['standalone'],
|
||||||
scope: './',
|
scope: './',
|
||||||
|
start_url: './',
|
||||||
publicPath: './',
|
publicPath: './',
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: 'images/icon.png',
|
src: 'images/icon.png',
|
||||||
|
destination: `${COMMIT_HASH}/images`,
|
||||||
sizes: [196, 512],
|
sizes: [196, 512],
|
||||||
ios: true
|
purpose: 'any',
|
||||||
|
ios: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'images/maskable_icon.png',
|
src: 'images/maskable_icon.png',
|
||||||
|
destination: `${COMMIT_HASH}/images`,
|
||||||
sizes: [196, 512],
|
sizes: [196, 512],
|
||||||
purpose: 'maskable',
|
purpose: 'maskable',
|
||||||
destination: path.join(COMMIT_HASH, 'images', 'maskable')
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'favicons/favicon.ico',
|
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,
|
fingerprints: false,
|
||||||
ios: true
|
ios: true
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue