Skip to content

Commit 4ca5da1

Browse files
committed
Add note why UNSTABLE is needed for closure compiler
1 parent d5986fa commit 4ca5da1

File tree

1 file changed

+1
-0
lines changed
  • content/case-study-foreign-integration-js-browser

1 file changed

+1
-0
lines changed

content/case-study-foreign-integration-js-browser/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Output size: 396K
7474

7575
Notice we have to call `google-closure-compiler` with two input files: first is the `all.js` package generated by the compiler after bundling our library with all dependencies,
7676
GHC's RTS and emscripten RTS files; second, is the `all.externs.js` file that declares external variables for the minifier. Its purpose is twofold - It informs the compiler that those variables are declared elsewhere, as not to fail with an "undeclared variable" error, and it prevents the mangling of those identifiers during minification.
77+
Note we had to add `--language_in UNSTABLE` when compiling for recent `emscripten` due to [this issue](https://github.com/emscripten-core/emscripten/issues/23179).
7778

7879
Nice! We reduced size of the js file from 1.8M to merely 396K. This is even smaller after compression:
7980
```sh

0 commit comments

Comments
 (0)