Skip to content

Commit 4d93ccd

Browse files
authored
fix: hot reload failure caused by Windows slash (#139)
1 parent 10a99db commit 4d93ccd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vite-plugin-mock-dev-server/src/compiler/compiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class Compiler extends EventEmitter {
5656
* 性能开销,从而影响编译速度。
5757
* 实测在控制并发数的前提下,总编译时间 差异不大,但内存开销更小更加稳定。
5858
*/
59-
.then(files => files.map(file => () => this.load(path.join(this.options.dir, file))))
59+
.then(files => files.map(file => () => this.load(normalizePath(path.join(this.options.dir, file)))))
6060
.then(loaders => promiseParallel(loaders, 64))
6161
.then(() => this.updateMockData())
6262

0 commit comments

Comments
 (0)