diff --git a/src/server/headed-mode-plugin.js b/src/server/headed-mode-plugin.js index 2a371d1d..c167494a 100644 --- a/src/server/headed-mode-plugin.js +++ b/src/server/headed-mode-plugin.js @@ -1,4 +1,4 @@ -import { dirname, join } from 'node:path'; +import { dirname, posix } from 'node:path'; import { globSync } from 'glob'; export function headedMode({ open, watch, pattern }) { @@ -9,7 +9,7 @@ export function headedMode({ open, watch, pattern }) { name: 'brightspace-headed-mode', async transform(context) { if ((watch || open) && files.includes(context.path.slice(1))) { - const pausePath = join(dirname(import.meta.url), 'pause.js').replace('file:', ''); + const pausePath = posix.join(dirname(import.meta.url), 'pause.js').replace(/file:(\/c:)?/i, ''); return `debugger;\nimport '${pausePath}'\n${context.body}`; } }