Skip to content

Commit 27fa108

Browse files
authored
fix(web): replace dynamic require with import
1 parent 853ca46 commit 27fa108

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/binding_web/src/language.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,7 @@ export class Language {
261261
} else {
262262
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
263263
if (globalThis.process?.versions.node) {
264-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports
265-
const fs: typeof import('fs/promises') = require('fs/promises');
264+
const fs: typeof import('fs/promises') = await import('fs/promises');
266265
bytes = fs.readFile(input);
267266
} else {
268267
bytes = fetch(input)

0 commit comments

Comments
 (0)