Skip to content

Commit

Permalink
fix: slash some path for windows (#48)
Browse files Browse the repository at this point in the history
Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
  • Loading branch information
markthree and posva committed Aug 16, 2022
1 parent 073c29c commit bc152e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/RoutesFolderWatcher.ts
@@ -1,4 +1,5 @@
import chokidar from 'chokidar'
import { normalize } from 'pathe'
import { ResolvedOptions, RoutesFolderOption } from '../options'

export class RoutesFolderWatcher {
Expand Down Expand Up @@ -32,6 +33,8 @@ export class RoutesFolderWatcher {
handler: (context: HandlerContext) => void
) {
this.watcher.on(event, (filePath) => {
// ensure consistent path for Windows and Unix
filePath = normalize(filePath)
// skip other extensions
if (
this.options.extensions.every(
Expand Down

0 comments on commit bc152e3

Please sign in to comment.