Skip to content

Commit 3790e26

Browse files
Fix path generation for msapplication-TileImage
Fixes #48 The path for msTileImage was put together the wrong way: "favicon.png-144x144.png" (wrong) vs "favicon-144x144.png" (right). This commit corrects the behaviour.
1 parent 1290754 commit 3790e26

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gridsome.client.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const { parse } = require('path');
12
const { register } = require('register-service-worker');
23

34
const clientConfig = function (Vue, options, context) {
@@ -30,8 +31,8 @@ const clientConfig = function (Vue, options, context) {
3031
}
3132

3233
const iconsDir = 'assets/static/';
33-
const iconName = options.icon.split('/').slice(-1)[0];
34-
const msTileImage = `/${iconsDir}${iconName}-144x144.png`;
34+
const iconPathParsed = parse(options.icon);
35+
const msTileImage = `/${iconsDir}${iconPathParsed.name}-144x144${iconPathParsed.ext}`;
3536

3637
head.link.push({
3738
rel: 'manifest',

0 commit comments

Comments
 (0)