Skip to content

Commit

Permalink
fix: windows path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed May 25, 2024
1 parent f415ba3 commit 1b9858a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node/processor/FileCacheProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import createDebug from 'debug'
import fs from 'fs-extra'
import path from 'node:path'
import colors from 'picocolors'
import { normalizePath } from 'vite'
import { globalConfig } from '../global-config'
import { writeFile } from '../helper/io'
import { findAllOldJsFile, pkgName } from '../helper/utils'
Expand Down Expand Up @@ -64,7 +65,7 @@ export class FileCacheProcessor extends ManifestCacheProcessor {

const jsFilePath = this.setCache(args, globalConfig.all)

fs.ensureDirSync(path.dirname(jsFilePath))
fs.ensureDirSync(normalizePath(path.dirname(jsFilePath)))

writeFile(jsFilePath, code)
}
Expand Down

0 comments on commit 1b9858a

Please sign in to comment.