Skip to content

Commit

Permalink
in cjs, use require to instead createRequire.
Browse files Browse the repository at this point in the history
fix #18
  • Loading branch information
windsonR committed Jan 23, 2024
1 parent ec3d582 commit 068ef26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/html/Base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import glob from 'fast-glob'
import debug from 'debug'
import { createRequire } from 'node:module';

const _require = createRequire(import.meta.url);
const _require = import.meta.url!==undefined ? createRequire(import.meta.url): require;

const fsp = fs.promises
const DEFAULT_GLOB_PATTERN = [
Expand Down

0 comments on commit 068ef26

Please sign in to comment.