Skip to content

Commit

Permalink
change from require to import
Browse files Browse the repository at this point in the history
  • Loading branch information
shunguoy committed Jul 27, 2024
1 parent 9ff72c1 commit 246ee91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion accessibility-checker/src-ts/lib/ACEngineManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as fs from "fs";
import { ACConfigManager } from "./common/config/ACConfigManager";
import { fetch_get_text } from "./common/api-ext/Fetch";
import { IChecker } from "./common/engine/IChecker";
import { createRequire as topRequire } from "module";

let ace;

Expand Down Expand Up @@ -269,7 +270,8 @@ export class ACEngineManager {

const nodePath = path.join(engineDir, `ace-node-${fileSuffix}`);
if (fs.existsSync(`${nodePath}.js`)) {
const ace_ibma = require(nodePath);
//const ace_ibma = require(nodePath);
const ace_ibma = await import(nodePath);
checker = new ace_ibma.Checker();
return resolve();
} else {
Expand Down

0 comments on commit 246ee91

Please sign in to comment.