swc/crates/swc_node_bundler/tests/pass/resolve-name-fix
Austaras 82bd8070cb
fix(es/resolver): Resolve top-level undefined, NaN, and Infinity correctly (#8471)
**Description:**

For following code
```js
var NaN = 1
console.log(NaN)
```
Result would be

|Envirnoment|Result|
|-|-|
|Non strict script(browser, nodejs repl)|NaN|
|Non strict script(nodejs script)|1|
|Strict script(browser, nodejs repl)|runtime error|
|Strict script(nodejs script)|1|
|ESM|1|

So SWC choose to behave like browser in script mode and confirm to esm
standard.


**Related issue:**

 - Closes #8465
2024-01-04 04:24:14 +00:00
..
input chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
output fix(es/resolver): Resolve top-level undefined, NaN, and Infinity correctly (#8471) 2024-01-04 04:24:14 +00:00