Skip to content

Commit 5e92af8

Browse files
authored
refactor: make onLoad async (#732)
1 parent 867defe commit 5e92af8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/open-next/src/plugins/resolve.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { readFileSync } from "node:fs";
1+
import { readFile } from "node:fs/promises";
22

33
import chalk from "chalk";
44
import type { Plugin } from "esbuild";
@@ -88,7 +88,7 @@ export function openNextResolvePlugin({
8888
build.onLoad(
8989
{ filter: getCrossPlatformPathRegex("core/resolve.js") },
9090
async (args) => {
91-
let contents = readFileSync(args.path, "utf-8");
91+
let contents = await readFile(args.path, "utf-8");
9292
const overridesEntries = Object.entries(overrides ?? {});
9393
for (let [overrideName, overrideValue] of overridesEntries) {
9494
if (!overrideValue) {

0 commit comments

Comments
 (0)