Skip to content

Commit 0fda225

Browse files
committed
fix: look for repl$ more carefully
1 parent 956c2d8 commit 0fda225

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/development/repl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ function loadReplFunctions<SLocals extends AnyServiceLocals = ServiceLocals<Conf
5858
// Read the file content as text
5959
const fileContent = fs.readFileSync(file, 'utf-8');
6060

61-
// Check if repl$ is present, in a very rudimentary way
62-
if (/repl\$\(/.test(fileContent)) {
61+
// Check if repl$ is present, in a very rudimentary way (note built JS has close paren not open)
62+
if (/repl\$[()]/.test(fileContent)) {
6363
// eslint-disable-next-line global-require, import/no-dynamic-require, @typescript-eslint/no-var-requires
6464
const module = require(path.resolve(file));
6565

0 commit comments

Comments
 (0)