Commit 1d81695
committed
Bugfix: Avoid dot notation in minified Javascript
It is better to use `[]` for object access in Javascript code that
is processed by Emscripten.
The Javascript libraries passed to emcc are being minified with
Google's [Closure
Compiler](https://developers.google.com/closure/compiler) due to the
`--closure 1` parameter.
The closure compiler minifies keys on objects.
```js
const mxPathName = vfs.mxPathName ?? 64;
```
is minified as
```js
var n=h.Lg??64;
```
where `h.Lg` is undefined, so `n` will always be `64`.
With this change, the minified output is
```js
var n=h.mxPathName??64;
```1 parent f1f8550 commit 1d81695
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments