Skip to content

Commit 32fa513

Browse files
Fixed an issue where file paths might not be created correctly.
1 parent 613ea96 commit 32fa513

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { obj } from 'through2'
22
import sharp from 'sharp'
33
import Vinyl from 'vinyl'
44
import chalk from 'chalk'
5+
import path from 'path'
56

67
const
78
ALLOWED_EXTENSIONS = [
@@ -94,7 +95,7 @@ function toVinyl(buffer, newFileFormat, file) {
9495
return new Vinyl({
9596
cwd: file.cwd,
9697
base: file.base,
97-
path: `${file.dirname}\\${newFileName}`,
98+
path: path.join(file.dirname, newFileName),
9899
contents: buffer,
99100
})
100101
}

0 commit comments

Comments
 (0)