We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19af9dd commit 56f2a3eCopy full SHA for 56f2a3e
packages/core/src/files.ts
@@ -72,9 +72,16 @@ export function setupPagesJsonFile(path: string) {
72
fs.readFileSync = new Proxy(fs.readFileSync, {
73
apply(target, thisArg, argArray) {
74
if (typeof argArray[0] === 'string' && normalizePath(argArray[0]) === normalizePath(path)) {
75
- checkPagesJsonFile(path).then(() => {
+ try {
76
+ const data = _readFileSync.apply(thisArg, argArray as any)
77
fs.readFileSync = _readFileSync
- })
78
+ return data
79
+ }
80
+ catch {
81
+ checkPagesJsonFile(path).then(() => {
82
+ fs.readFileSync = _readFileSync
83
+ })
84
85
return EMPTY_PAGES_JSON_CONTENTS
86
}
87
return Reflect.apply(target, thisArg, argArray)
0 commit comments