Skip to content

Commit

Permalink
feat(sandboxes): use the more compatible dynamic import instead of re…
Browse files Browse the repository at this point in the history
…quire
  • Loading branch information
manast committed Dec 5, 2023
1 parent fcf98f4 commit 6d2fe6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/classes/child-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class ChildProcessor {
public async init(processorFile: string): Promise<void> {
let processor;
try {
processor = require(processorFile);
processor = await import(processorFile);

if (processor.default) {
// support es2015 module.
Expand Down

0 comments on commit 6d2fe6e

Please sign in to comment.