Skip to content

Commit af7dd0c

Browse files
Update scripts/build-e2e.mjs
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 35270bb commit af7dd0c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/build-e2e.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ function patchImportMeta(filePath) {
4040
return;
4141
}
4242

43-
content = content.replace("var import_meta = {};", IMPORT_META_DECL);
44-
content = content.replaceAll('"globalSetup.ts"', '"globalSetup.js"');
43+
const importMetaPattern = /var import_meta = \{\};/g;
44+
if (importMetaPattern.test(content)) {
45+
content = content.replace(importMetaPattern, IMPORT_META_DECL);
46+
}
4547
fs.writeFileSync(filePath, content, "utf8");
4648
}
4749

0 commit comments

Comments
 (0)