Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connot compile optional chaining when the word eval is present inside the file. #926

Open
bytemuck opened this issue Apr 26, 2023 · 0 comments

Comments

@bytemuck
Copy link

bytemuck commented Apr 26, 2023

using esm version 3.2.25
with node v16.19.1

let s = "a string"; // a comment with the word eval

let x = {
    a: "b"
}

console.log(x?.a);

does not compile.

let s = "eval"; // a comment without the e word

let x = {
    a: "b"
}

console.log(x?.a);

does not compile.

the error is

console.log(x?.a);
              ^

SyntaxError: Invalid or unexpected token
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10)

but when I dont put eval anywhere, it compiles fine

i use node -r esm file.js to run the project.

@bytemuck bytemuck changed the title Connot compile optional chaining when the word eval is present it file. Connot compile optional chaining when the word eval is present inside the file. Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant