There was an error while loading. Please reload this page.
1 parent 29692ea commit 1cf8ae6Copy full SHA for 1cf8ae6
1 file changed
packages/core/src/path.ts
@@ -1,4 +1,4 @@
1
-import path from 'node:path'
+import path from 'node:path/posix'
2
import type { ImageFormat } from './formats.ts'
3
4
/**
@@ -9,10 +9,11 @@ import type { ImageFormat } from './formats.ts'
9
* @returns Image variant file path.
10
*/
11
export function renameImagePath(imagePath: string, postfix: string, format: ImageFormat) {
12
+ // Posix separators, so variant paths are stable across platforms.
13
const {
14
dir,
15
name
- } = path.parse(imagePath)
16
+ } = path.parse(imagePath.replaceAll('\\', '/'))
17
18
return path.format({
19
0 commit comments