Skip to content

Commit

Permalink
Fix Windows headed mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bearfriend committed Jul 25, 2023
1 parent 2ea2afc commit 38f8041
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/headed-mode-plugin.js
Original file line number Diff line number Diff line change
@@ -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 }) {
Expand All @@ -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:', '');
return `debugger;\nimport '${pausePath}'\n${context.body}`;
}
}
Expand Down

0 comments on commit 38f8041

Please sign in to comment.