Skip to content

Commit

Permalink
Use posix path for pwa paths. #388
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Oct 12, 2022
1 parent b25e8fa commit ee8fe69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/platforms/pwa/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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 =
(
Expand All @@ -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}`,
};
Expand Down

0 comments on commit ee8fe69

Please sign in to comment.