Skip to content

Commit c466747

Browse files
authored
Merge pull request #31 from Mushr00mZhang/main
normallize cwd, to ensure path splitter is the same
2 parents c7223a4 + 7996bdb commit c466747

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/html/Build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class Build extends Base {
2121
* @param needRemove
2222
*/
2323
async checkVirtualPath(html: string, needRemove: Array<string>, root: string) {
24-
const cwd = path.resolve(this.cwd, root)
24+
const cwd = normalizePath(path.resolve(this.cwd, root))
2525
const pathArr = html.split('/')
2626
const fileName = pathArr[pathArr.length - 1]
2727
const middlePath = html.replace(fileName, '').replace(cwd, '')

0 commit comments

Comments
 (0)