diff --git a/precompile-schemas/index.js b/precompile-schemas/index.js index 69f356a..7cea498 100644 --- a/precompile-schemas/index.js +++ b/precompile-schemas/index.js @@ -131,7 +131,7 @@ const postprocess = async (code) => { // Keep in sync with the `absolutePath` keyword of `schema-utils`, the // pre-compiled schema has to accept exactly what the real one accepts if (/absolutePathRegExp/.test(code)) - code = `const absolutePathRegExp = /^(?:file:\\/\\/)?(?:[A-Za-z]:[\\\\/]|\\\\\\\\|\\/)/;${code}`; + code = `const absolutePathRegExp = /^(?:file:(?=\\/))?(?:[A-Za-z]:[\\\\/]|\\\\\\\\|\\/)/i;${code}`; // remove unnecessary error code: code = code