From ee8fe69b3b8f7d4b3c402708d95a9d158c4452e0 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 12 Oct 2022 16:55:34 -0500 Subject: [PATCH] Use posix path for pwa paths. #388 --- src/platforms/pwa/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platforms/pwa/index.ts b/src/platforms/pwa/index.ts index d585273..796bfbf 100644 --- a/src/platforms/pwa/index.ts +++ b/src/platforms/pwa/index.ts @@ -1,4 +1,4 @@ -import { basename, extname, join, relative } from 'path'; +import { basename, extname, join, posix, relative, sep } from 'path'; import { mkdirp, pathExists, readFile, readJSON, writeJSON } from '@ionic/utils-fs'; import { InputAsset } from '../../input-asset'; @@ -378,6 +378,7 @@ export class PwaAssetGenerator extends AssetGenerator { private makeIconManifestEntry(asset: PwaOutputAssetTemplate, relativePath: string): ManifestIcon { const ext = extname(relativePath); + const posixPath = relativePath.split(sep).join(posix.sep); const type = ( @@ -390,7 +391,7 @@ export class PwaAssetGenerator extends AssetGenerator { )[ext] || 'image/png'; let entry: ManifestIcon = { - src: relativePath, + src: posixPath, type, sizes: `${asset.width}x${asset.height}`, };