Skip to content

Commit

Permalink
fix: Windows headed mode (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
bearfriend committed Jul 26, 2023
1 parent b042d37 commit 0ec21ba
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:(\/c:)?/i, '');
return `debugger;\nimport '${pausePath}'\n${context.body}`;
}
}
Expand Down

0 comments on commit 0ec21ba

Please sign in to comment.