Skip to content

Commit

Permalink
refactor: use file urls on all platforms in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Dec 6, 2022
1 parent a85cbc4 commit 9be3f2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { defu } from 'defu'
import { resolveModuleExportNames, resolvePath as resolveModule } from 'mlly'
// import escapeRE from 'escape-string-regexp'
import { withLeadingSlash, withoutTrailingSlash, withTrailingSlash } from 'ufo'
import { isTest, isDebug, isWindows } from 'std-env'
import { isTest, isDebug } from 'std-env'
import { findWorkspaceDir } from 'pkg-types'
import { resolvePath, detectTarget } from './utils'
import type { NitroConfig, NitroOptions, NitroRouteConfig, NitroRouteRules } from './types'
Expand Down Expand Up @@ -262,7 +262,7 @@ export async function loadOptions (configOverrides: NitroConfig = {}): Promise<N
// Resolve plugin paths
options.plugins = options.plugins.map((p) => {
const path = resolvePath(p, options)
if (isWindows && options.dev && isAbsolute(path)) {
if (options.dev && isAbsolute(path)) {
return pathToFileURL(path).href
}
return path
Expand Down

0 comments on commit 9be3f2c

Please sign in to comment.